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 action hooks.
Since this document doesn’t contain a tutorial for using these action hooks, you can check this document for more details.
All Gateway Actions
{method_id}_before_payment_field_checkout
Action before payment field
Parameter: none
{method_id}_after_payment_field_checkout
Action after payment field
Parameter: none
Local Gateway Actions
cpsw_add_notices_for_local_gateways
Action for add more notices for local gateways
Parameter 1: object ($notice)
Parameter 2: object (Current object)
cpsw_local_gateways_process_payment
Action when processing the payment after stripe transaction
Parameter 1: object ($intent_data)
Parameter 2: object (WC Order)
cpsw_local_gateways_modify_successful_payment_result
Local gateways modify successful payment result
Parameter 1: object ($result)
Parameter 2: object (WC Order)
cpsw_local_gateways_process_order
Action when process order
Parameter 1: object ($response)
Parameter 2: object (WC Order)
Parameter 3: string (method_id)
Card Payments Actions
cpsw_add_payment_method_{method_id}_success
Action after payment method add
Parameter 1: string ($source_id)
Parameter 2: obj ($source)
cpsw_payment_fields_cpsw_stripe
Action after card payment fields show on the checkout page
Parameter 1: string ($method_id)
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 |
Admin Controller Actions
cpsw_before_connection_with_stripe
Action before connection with Stripe
Parameter: none
cpsw_after_connection_with_stripe
Action after connection with Stripe
Parameter: none
cpsw_before_connected_with_stripe
Action before connected with Stripe
Parameter: none
cpsw_after_connected_with_stripe
Action after connected with Stripe
Parameter: none
cpsw_before_express_checkout_preview
Action before express checkout preview.
Parameter: none
cpsw_after_express_checkout_preview
Action after express checkout preview.
Parameter: none
cpsw_before_stripe_connect_button
Action before Stripe-connect button with Stripe.
Parameter 1: array (button values)
Parameter 2: array (field data)
cpsw_after_stripe_connect_button
Action after Stripe-connect button with Stripe.
Parameter 1: array (button values)
Parameter 2: array (field data)
Subscriptions Actions
cpsw_change_subs_payment_method_success
Action when payment method change for subscriptions
Parameter 1: obj ($source)
Parameter 2: obj ($prepared_source)
cpsw_stripe_process_payment_authentication_required
Action when authentication required for subscription
Parameter 1: obj ($renewal_order)
Parameter 2: obj ($response)
cpsw_stripe_process_payment
Action before subscription process response
Parameter 1: obj ($response)
Parameter 2: obj ($renewal_order)
cpsw_stripe_process_payment_error
Action when subscription payment failed
Parameter 1: obj ($error_object)
Parameter 2: obj ($renewal_order)
cpsw_stripe_process_response
Action before return process response
Parameter 1: obj ($response)
Parameter 2: obj ($order)
cpsw_has_authentication_already_failed
Action for after authentication already failed
Parameter 1: object ($renewal_order)
Webhook Actions
cpsw_process_response
Action after process response
Parameter 1: obj ($response)
Parameter 2: obj ($order)