woocommerce_payment_methods_list_item

The WooCommerce woocommerce payment methods list item hook.

Description

apply_filters( 'woocommerce_payment_methods_list_item', (unknown) $list_type_key, (unknown) $payment_token ); 

Parameters (2)

0. $list_type_key (unknown)
The list type key.
1. $payment_token (unknown)
The payment token.

Usage

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

Defined (1)

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

/includes/wc-account-functions.php  
  1. $list[ $type ][ $key ] = apply_filters( 'woocommerce_payment_methods_list_item', $list[ $type ][ $key ], $payment_token );