Automattic\WooCommerce\Internal\Admin\Settings\PaymentsProviders
Paymob::needs_setup
Check if the payment gateway needs setup.
Note: We are overriding the parent method to avoid infinite recursion with the is_account_connected method.
Method of the class: Paymob{}
No Hooks.
Returns
true|false. True if the payment gateway needs setup, false otherwise.
Usage
$Paymob = new Paymob(); $Paymob->needs_setup( $payment_gateway ): bool;
- $payment_gateway(WC_Payment_Gateway) (required)
- The payment gateway object.
Paymob::needs_setup() Paymob::needs setup code WC 10.8.1
public function needs_setup( WC_Payment_Gateway $payment_gateway ): bool {
$needs_setup = wc_string_to_bool( $payment_gateway->needs_setup() );
// If we get a true value, it means the gateway needs setup.
if ( $needs_setup ) {
return true;
}
// If we reach here, just assume that the gateway does not need setup.
return false;
}