Automattic\WooCommerce\Internal\Admin\WCPayPromotion
Init::can_show_promotion()
Checks if promoted gateway can be registered.
Метод класса: Init{}
Хуков нет.
Возвращает
true|false
. If promoted gateway should be registered.
Использование
$result = Init::can_show_promotion();
Код Init::can_show_promotion() Init::can show promotion WC 9.6.2
public static function can_show_promotion() { // Don't show if WooPayments is enabled. if ( class_exists( '\WC_Payments' ) ) { return false; } // Don't show if there is no WooPayments promotion spec. $wc_pay_spec = self::get_wc_pay_promotion_spec(); if ( ! $wc_pay_spec ) { return false; } return true; }