woocommerce_no_available_payment_methods_message

The WooCommerce woocommerce no available payment methods message hook.

Description

apply_filters( 'woocommerce_no_available_payment_methods_message', (number) $var ); 

Parameters (1)

0. $var (number) => WC()->customer->get_billing_country() ? __( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) : __( 'Please fill in your details above to see available payment methods.', 'woocommerce' )
The wc.

Usage

To run the hook, copy the example below.
  1. $var = apply_filters( 'woocommerce_no_available_payment_methods_message', $var ); 
  2.  
  3. if ( !empty( $var ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_no_available_payment_methods_message callback 
  2. function filter_woocommerce_no_available_payment_methods_message( $var ) { 
  3. // make filter magic happen here... 
  4. return $var
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_no_available_payment_methods_message', 'filter_woocommerce_no_available_payment_methods_message', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_no_available_payment_methods_message', 'filter_woocommerce_no_available_payment_methods_message', 10, 1 ); 

Defined (2)

The filter is defined in the following location(s).

/templates/checkout/payment.php  
  1. echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' . apply_filters( 'woocommerce_no_available_payment_methods_message', WC()->customer->get_billing_country() ? __( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) : __( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) ) . '</li>'; 
/templates/checkout/form-pay.php  
  1. echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' . apply_filters( 'woocommerce_no_available_payment_methods_message', __( 'Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) ) . '</li>';