Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions
DefaultPaymentGateways::get_rules_for_wcpay_activated()
Get default rules for the WooPayments plugin being installed and activated.
Метод класса: DefaultPaymentGateways{}
Хуков нет.
Возвращает
Объект
. Rules to match.
Использование
$result = DefaultPaymentGateways::get_rules_for_wcpay_activated( $should_be );
- $should_be(true|false) (обязательный)
- Whether WooPayments should be activated.
Код DefaultPaymentGateways::get_rules_for_wcpay_activated() DefaultPaymentGateways::get rules for wcpay activated WC 9.7.1
public static function get_rules_for_wcpay_activated( $should_be ) { $active_rule = (object) array( 'type' => 'plugins_activated', 'plugins' => array( 'woocommerce-payments' ), ); if ( $should_be ) { return $active_rule; } return (object) array( 'type' => 'not', 'operand' => array( $active_rule ), ); }