Automattic\WooCommerce\Internal\Admin\Settings
PaymentProviders::is_offline_payment_method
Check if a payment gateway is an offline payment method.
Method of the class: PaymentProviders{}
No Hooks.
Returns
true|false
. True if the payment gateway is an offline payment method, false otherwise.
Usage
$PaymentProviders = new PaymentProviders(); $PaymentProviders->is_offline_payment_method( $id ): bool;
- $id(string) (required)
- The ID of the payment gateway.
PaymentProviders::is_offline_payment_method() PaymentProviders::is offline payment method code WC 9.9.4
public function is_offline_payment_method( string $id ): bool { return in_array( $id, self::OFFLINE_METHODS, true ); }