Automattic\WooCommerce\Gateways\PayPal
Buttons::__construct
Constructor.
Method of the class: Buttons{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Buttons = new Buttons(); $Buttons->__construct( $gateway );
- $gateway(WC_Gateway_Paypal) (required)
- The gateway instance.
Buttons::__construct() Buttons:: construct code WC 10.6.2
public function __construct( \WC_Gateway_Paypal $gateway ) {
$this->gateway = $gateway;
$this->request = new PayPalRequest( $this->gateway );
$this->enabled = $this->gateway->should_use_orders_v2() && 'yes' === $this->gateway->get_option( 'paypal_buttons', 'yes' );
}