WC_Payment_Gateways::should_load_paypal_standard()protectedWC 5.5.0

Determines if PayPal Standard should be loaded.

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

Хуков нет.

Возвращает

true|false. Whether PayPal Standard should be loaded or not.

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

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

Список изменений

С версии 5.5.0 Введена.

Код WC_Payment_Gateways::should_load_paypal_standard() WC 9.4.2

protected function should_load_paypal_standard() {
	// Tech debt: This class needs to be initialized to make sure any existing subscriptions gets processed as expected, even if the gateway is not enabled for new orders.
	// Eventually, we want to load this via a singleton pattern to avoid unnecessary instantiation.
	$paypal = new WC_Gateway_Paypal();
	return $paypal->should_load();
}