Automattic\WooCommerce\Gateways\PayPal
Buttons::__construct
Constructor.
Метод класса: Buttons{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Buttons = new Buttons(); $Buttons->__construct( $gateway );
- $gateway(WC_Gateway_Paypal) (обязательный)
- The gateway instance.
Код Buttons::__construct() Buttons:: construct WC 11.2.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' );
}