WC_Gateway_Paypal::init_api()protectedWC 1.0

Init the API class and set the username/password etc.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->init_api();

Код WC_Gateway_Paypal::init_api() WC 8.7.0

protected function init_api() {
	include_once dirname( __FILE__ ) . '/includes/class-wc-gateway-paypal-api-handler.php';

	WC_Gateway_Paypal_API_Handler::$api_username  = $this->testmode ? $this->get_option( 'sandbox_api_username' ) : $this->get_option( 'api_username' );
	WC_Gateway_Paypal_API_Handler::$api_password  = $this->testmode ? $this->get_option( 'sandbox_api_password' ) : $this->get_option( 'api_password' );
	WC_Gateway_Paypal_API_Handler::$api_signature = $this->testmode ? $this->get_option( 'sandbox_api_signature' ) : $this->get_option( 'api_signature' );
	WC_Gateway_Paypal_API_Handler::$sandbox       = $this->testmode;
}