WordPress at Your Fingertips
function is not described

WC_Gateway_Paypal::init_api() protected WC 1.0

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

{} It's a method of the class: WC_Gateway_Paypal{}

No Hooks.

Return

null. Nothing.

Usage

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

Code of WC_Gateway_Paypal::init_api() WC 5.7.1

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