WordPress filter hook
woocommerce_credit_card_form_fields
Defined by WooCommerce and fired by 37 plugins in total, running on 7M+ sites between them.
How to use woocommerce_credit_card_form_fields
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_credit_card_form_fields', function( $default_fields, $id ) {
// Change $default_fields here.
return $default_fields;
}, 10, 2 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
37 plugins that fire woocommerce_credit_card_form_fields
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/gateways/class-wc-payment-gateway-cc.php:82 -
PagBank for WooCommerce4,000+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )src/core/Gateways/CreditCardPaymentGateway.php:691 -
CHIP for WooCommerce4,000+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $filtered_fields, $this->id )includes/class-chip-woocommerce-gateway.php:4153 -
PagBank / PagSeguro e Vindi para WooCommerce3,000+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, Connect::DOMAIN )src/templates/payments/creditcard.php:94 -
Express Checkout via PayPal for WooCommerce800+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )ppcp/includes/class-ppcp-paypal-checkout-for-woocommerce-gateway.php:111 -
XL NMI Gateway for WooCommerce800+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/class-nmi-gateway-woocommerce-base.php:594 -
Elavon Payment Gateway for WooCommerce300+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )src/ConvergeGateway.php:1734 -
Sola Payment Gateway for WooCommerce300+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/class-wc-gateway-cardknox.php:199 -
Authorize.Net/eProcessing Network Payment Gateway for WooCommerce100+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )authorize.net-woocommerce-lightweight-addon.php:328 -
e-SCOTT Smart light for WooCommerce100+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/class-spfwc-light-payment-gateway.php:450 -
Kuroneko Web Collect for Woo100+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/class-kupaywc-payment-gateway.php:367 -
pay bi100+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )ebi_pay_classic_gateway.php:207 -
Paymentfor Gateway for WooCommerce90+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/class-paymentfor-wc-payment-gateway.php:488 -
Complete PayPal Payments For WooCommerce80+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/class-complete-paypal-payments-for-woocommerce-gateway.php:107 -
MerchantOne Payment Gateway WooCommerce Addon70+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )webmicro-merchantone-woo-addon.php:272 -
Network Merchant Payment Gateway for WooCommerce60+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )webmicro-nmi-woo-addon.php:250 -
Avify50+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )avify-payments-gateway.php:346 -
Payroc Gateway for WooCommerce40+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/class-payroc-gateway.php:648 -
Worldnet Payments Gateway for WooCommerce40+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/class-worldnetpayments-gateway.php:648 -
Bluepay Payment Gateway WooCommerce Addon30+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )webmicro-bluepay-woo.php:307 -
goEmerchant Payment Gateway Plugin for WooCommerce30+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/class-wc-gateway-goe.php:956 -
e-SCOTT Smart pro for WooCommerce20+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/class-spfwc-payment-gateway.php:526 -
PayPal Payflow Pro Payment gateway for WooCommerce20+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )webmicro-payflowpro-woo-addon.php:347 -
MerchantX Gateway for WooCommerce10+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )class/merchantx_gateway.php:326 -
PayPal Website Payments Pro for WooCommerce10+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )paypalpro-woocommerce-addon.php:190 -
Braintree Payment Gateway For WooCommerce10+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )webmicro-braintree-woo-addon.php:211 -
Woo Braintree Payment10+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )include/woo-mynix-braintree.php:92 -
Ecrypt Payment Gateway for WooCommerce10+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/classes/ecrypt-payment-gateway-method.php:501 -
Payment Gateway for Nuvei on WooCommerce10+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )wc-nuvei-payment-gateway.php:259 -
1stPayGateway for WooCommerce10+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/class-wc-gateway-1stpay.php:956 -
Thanh Toan The Cao Dien Thoai10+ installs
apply_filters( 'woocommerce_credit_card_form_fields', array($this, 'phonecard_payment_form') )card-getway.php:45 -
Neopayment10+ installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )class-neopayment-cc.php:147 -
Goopter advanced integration for PayPal Complete Payments and for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )ppcp-gateway/class-wc-gateway-cc-goopter.php:427 -
CartGateway Payment Gateway for WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )includes/cart_gateway.php:326 -
Payments Gateway for Greenlight on WooCommerceFewer than 10 installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )classes/class-wc-greenlight-payments.php:277 -
Payment Gateway for FrubipayFewer than 10 installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )template-parts/card-form.php:26 -
Facture PayFewer than 10 installs
apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id )facture-authorize-woocommerce.php:119
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.