wc_order_payment_card_info
Filter to allow payment gateways to provide payment card info for an order.
Usage
add_filter( 'wc_order_payment_card_info', 'wp_kama_wc_order_payment_card_info_filter', 10, 2 );
/**
* Function for `wc_order_payment_card_info` filter-hook.
*
* @param array|null $info The card info.
* @param WC_Abstract_Order $order The order.
*
* @return array|null
*/
function wp_kama_wc_order_payment_card_info_filter( $info, $order ){
// filter...
return $info;
}
- $info(array|null)
- The card info.
- $order(WC_Abstract_Order)
- The order.
Changelog
| Since 9.5.0 | Introduced. |
Where the hook is called
wc_order_payment_card_info
woocommerce/src/Internal/Orders/PaymentInfo.php 45
$info = apply_filters( 'wc_order_payment_card_info', array(), $order );