This is a Stripe For WooCommerce document for developers. Thus, if you want to extend or customize Stripe for WooCommerce, this document contains a list of available filter hooks.
Since this document doesn’t contain a tutorial for using these filter hooks, you can check this document for more details.
Local Gateway Filters
cpsw_local_payment_supports_{method_id}
Using this hook can add more payment support for local gateways. Add {method_id} to add support for specific local gateway. Check the {method_id} list here.
Parameter 1: array
cpsw_stripe_form_fields_{method_id}
Using this hook can add more payment fields on the admin payment settings page for local gateways only. Add {method_id} to add more payment fields for specific local gateway. Check the {method_id} list here.
Parameter 1: array
cpsw_local_gateway_test_description
Using this hook can modify the test description on the checkout page. The test description is displayed below the payment checkbox.
Parameter 1: array
cpsw_local_payment_description
Local gateway payment description
Parameter 1: string
cpsw_local_methods_default_settings
Local gateway default admin settings fields data
Parameter 1: array
cpsw_local_gateways_payment_intent_data
Local gateway payment intent post data
Parameter 1: array
Method Ids
Gateway | method_id |
Stripe Card Processing | cpsw_stripe |
Alipay | cpsw_alipay |
iDEAL | cpsw_ideal |
Klarna | cpsw_klarna |
P24 | cpsw_p24 |
Bancontact | cpsw_bancontact |
Abstract Payment Gateway Filters
cpsw_metadata_details
Update meta details for customer data. This data is sent to Stripe when creating a payment intent. Here have the billing info.
Parameter 1: array ($details)
Parameter 2: object ($order)
cpsw_payment_icons
Update payment gateways icons. You can modify payment icons image HTML codes displayed on the checkout page.
Parameter 1: html
cpsw_get_order_description
Modify payment title description which is being sent to Stripe. Using this hook, you can modify the transaction title on Stripe payment.
Parameter 1: string
cswp_clients_details
Plugin Client details data
Parameter 1: array
cpsw_refund_request_args
Stripe refund request args data
Parameter 1: array
cpsw_prepare_payment_method_args
Stripe prepare payment method args filter
Parameter 1: array
Frontend Scripts Filters
cpsw_payment_request_localization
Modify the payment request localization data for frontend scripts. Here mainly have all gateways scripts.
Parameter 1: array
Admin Controller Filters
cpsw_settings
Modify the main Stripe API Settings fields. Using this hook, you can modify settings fields for the backend settings page (Payment).
Parameter 1: array
cpsw_setting_tabs
Modify the admin settings tabs. Using this hook, you can add more tabs on the backend setting page (Payment).
Parameter 1: array
cpsw_settings_navigation
Plugin admin setting page main navigation
Parameter 1: array
cpsw_allow_admin_scripts_methods
Methods list for allow admin scritps
Parameter 1: array
cpsw_admin_localize_script_args
Modify for admin localize scripts data
Parameter 1: array
cpsw_express_checkout_localize_args
Modify for express checkout localize scripts data
Parameter 1: array
cpsw_stripe_connect_url_data
Stripe connect URL data
Parameter 1: array
cpsw_connection_test_results
Stripe connect connection results after connected
Parameter 1: object
cpsw_webhook_options
Stripe webhook options data
Parameter 1: array
cpsw_express_checkout_settings
Express checkout settings field data hooks
Parameter 1: array
Helper Filters
cpsw_gateway_settings
Modify the Credit/Debit Cards settigs field on admin payment setting page.
Parameter 1: array
cpsw_payment_mode
Modify the gateway mode when get return the payment mode. Any one can modify the payment mode (test/live)
Parameter 1: string
Subscriptions Filters
cpsw_update_subs_payment_method_card_status
Modify then statuses when get the subscriptions statuses when subscription payment success.
Parameter 1: array
cpsw_display_update_subs_payment_method_card_checkbox
Modify payment method card checkbox status for display subscription payment checkout
Parameter 1: boolean
cpsw_display_update_subs_cpsw_save_to_subs_text
Update the Payment Method save to subscriptions field label.
Parameter 1: string
cpsw_save_to_subs_checked
Update save to subscriptions field default value
Parameter 1: boolean
cpsw_use_default_customer_source
Update default customer source
Parameter 1: boolean
cpsw_create_and_confirm_intent_post_data
Stripe create and confirm intent post data for subscription
Parameter 1: array
Card Payments Filters
cpsw_force_save_card
Modify the force save card status
Parameter 1: string
cpsw_redirect_order_url
Modify rediect order url after payment succes
Parameter 1: string
cpsw_display_save_payment_method_checkbox
Modify display tokenization data
Parameter 1: string
cpsw_saved_cards_label
Update save card for future payments
Parameter 1: string
cpsw_payment_complete_order_status
Update payment complete order status
Parameter 1: string
cpsw_card_payment_supports
Stripe card payment supports filter
Parameter 1: array
cpsw_card_payment_form_fields
Stripe card payment admin settings fields
Parameter 1: array
cpsw_card_payment_intent_post_data
Card payment intent post data filter
Parameter 1: array
cpsw_card_payment_return_intent_data
Card payment return response data
Parameter 1: array
Ideal Filters
cpsw_ideal_supported_currencies
Update the iDEAL supported currencies
Parameter 1: array
Klarna Filters
cpsw_klarna_supported_currencies
Update the Klarna supported currencies
Parameter 1: array
Stripe API Filters
cpsw_klcpsw_get_secret_key
Update secret key
Parameter 1: string
Payment Request API Filters
cpsw_payment_request_total_label
Update the payment request total label
Parameter 1: string
cpsw_payment_request_product_data
Update payment request product data
Parameter 1: array ($data)
Parameter 2: object ($product)
cpsw_stripe_calculated_total
Update stripe calculated total
Parameter 1: amount
cpsw_payment_request_add_to_cart_sold_individually_quantity
Update card sold individually quantity
Parameter 1: integer
cpsw_payment_request_shipping_posted_values
Update payment request shipping posted values
Parameter 1: array
Autoloader Filters
cpsw_plugin_action_links
Plugin actions links for plugin listing page
Parameter 1: array