Automattic\WooCommerce\Internal\Admin\Settings\PaymentProviders
PaymentGateway::is_account_connected()
Check if the payment gateway has a payments processor account connected.
Метод класса: PaymentGateway{}
Хуков нет.
Возвращает
true|false
. True if the payment gateway account is connected, false otherwise. If the payment gateway does not provide the information, it will return true.
Использование
$PaymentGateway = new PaymentGateway(); $PaymentGateway->is_account_connected( $payment_gateway ): bool;
- $payment_gateway(WC_Payment_Gateway) (обязательный)
- The payment gateway object.
Код PaymentGateway::is_account_connected() PaymentGateway::is account connected WC 9.6.1
public function is_account_connected( WC_Payment_Gateway $payment_gateway ): bool { if ( is_callable( array( $payment_gateway, 'is_account_connected' ) ) ) { return filter_var( $payment_gateway->is_account_connected(), FILTER_VALIDATE_BOOLEAN ); } if ( is_callable( array( $payment_gateway, 'is_connected' ) ) ) { return filter_var( $payment_gateway->is_connected(), FILTER_VALIDATE_BOOLEAN ); } // Fall back to assuming that it is connected. This is the safest option. return true; }