WC_Gateway_Paypal_Request::fetch_paypal_client_id │ public │ WC 1.0

Устарела с версии 0.5.0. Больше не поддерживается и может быть удалена. Используйте Automattic\WooCommerce\Gateways\PayPal\Request::fetch_paypal_client_id(). This method will be removed in 11.0.0.

Fetch the PayPal client-id from the Transact platform.

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

Хуков нет.

Возвращает

string|null. The PayPal client-id, or null if the request fails.

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

$WC_Gateway_Paypal_Request = new WC_Gateway_Paypal_Request();
$WC_Gateway_Paypal_Request->fetch_paypal_client_id();

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

Устарела с 10.5.0 Use Automattic\WooCommerce\Gateways\PayPal\Request::fetch_paypal_client_id() instead. This method will be removed in 11.0.0.

Код WC_Gateway_Paypal_Request::fetch_paypal_client_id() WC 11.2.2

public function fetch_paypal_client_id() {
	wc_deprecated_function( __METHOD__, '10.5.0', 'Automattic\WooCommerce\Gateways\PayPal\Request::fetch_paypal_client_id()' );
	if ( ! $this->request ) {
		$this->request = new PayPalRequest( $this->gateway );
	}
	return $this->request->fetch_paypal_client_id();
}