woocommerce_quickpay_cardtypelock_<payment_method>

The WooCommerce QuickPay woocommerce quickpay cardtypelock payment method hook.

Description

apply_filters( 'woocommerce_quickpay_cardtypelock_<payment_method>', (unknown) $cardtypelock, (unknown) $payment_method ); 

Parameters (2)

0. $cardtypelock (unknown)
The cardtypelock.
1. $payment_method (unknown)
The payment method.

Usage

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

Defined (1)

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

/classes/api/woocommerce-quickpay-api-transaction.php  
  1. 'payment_methods' => apply_filters('woocommerce_quickpay_cardtypelock_' . $payment_method, $cardtypelock, $payment_method),