WC_Gateway_Paypal_Helper::get_wc_order_from_paypal_custom_id │ public static │ WC 1.0

Устарела с версии 0.5.0. Больше не поддерживается и может быть удалена. Используйте Automattic\WooCommerce\Gateways\PayPal\Helper::get_wc_order_from_paypal_custom_id().

Get the WC order from the PayPal custom ID.

Метод класса: WC_Gateway_Paypal_Helper{}

Хуков нет.

Возвращает

WC_Order|null.

Использование

$result = WC_Gateway_Paypal_Helper::get_wc_order_from_paypal_custom_id( $custom_id );
$custom_id(строка) (обязательный)
The custom ID string from the PayPal order.

Список изменений

Устарела с 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() WC 11.2.2

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 );
}