WC_Gateway_Paypal::init_api()protectedWC 1.0

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

Method of the class: WC_Gateway_Paypal{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->init_api();

WC_Gateway_Paypal::init_api() code 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;
}