WC_Gateway_Paypal_Helper::get_wc_order_from_paypal_custom_idpublic staticWC 1.0

Deprecated since 0.5.0. It is no longer supported and may be removed in future releases. Use Automattic\WooCommerce\Gateways\PayPal\Helper::get_wc_order_from_paypal_custom_id() instead.

Get the WC order from the PayPal custom ID.

Method of the class: WC_Gateway_Paypal_Helper{}

No Hooks.

Returns

WC_Order|null.

Usage

$result = WC_Gateway_Paypal_Helper::get_wc_order_from_paypal_custom_id( $custom_id );
$custom_id(string) (required)
The custom ID string from the PayPal order.

Changelog

Deprecated since 10.5.0 Use Automattic\WooCommerce\Gateways\PayPal\Helper::get_wc_order_from_paypal_custom_id() instead.

WC_Gateway_Paypal_Helper::get_wc_order_from_paypal_custom_id() code WC 10.8.1

public static function get_wc_order_from_paypal_custom_id( $custom_id ) {
	wc_deprecated_function( __METHOD__, '10.5.0', 'Automattic\WooCommerce\Gateways\PayPal\Helper::get_wc_order_from_paypal_custom_id()' );
	if ( ! is_string( $custom_id ) || '' === $custom_id ) {
		return null;
	}

	return PayPalHelper::get_wc_order_from_paypal_custom_id( (string) $custom_id );
}