Action and Filter Hooks - woocommerce/woocommerce-gateway-stripe GitHub Wiki

This page describes the action and filter hooks available to you if you need to manipulate how the Stripe payment gateway functions.

[!NOTE] We are unable to provide support for custom code under our Support Policy. If you need assistance with custom code, we highly recommend Codeable or a Certified WooExpert.

The documentation in this page was last updated for Stripe 9.6.0, which was released on 2025-07-08.

Supported Actions

Action Parameter(s) Description
wc_gateway_stripe_process_response (code) $stripe_response$order The response we get back after calling a charge request to Stripe.
woocommerce_credit_card_form_start (code) $gateway_id Before showing the credit card form.
woocommerce_credit_card_form_end (code) $gateway_id After showing the credit card form.
wc_gateway_stripe_process_payment (code) $stripe_response$order The response we get back after calling a charge request to Stripe but before processing the actual response.
wc_gateway_stripe_process_payment_error (code) $error$order Called when an error occurs during the process payment event.
woocommerce_stripe_add_customer (code) $args$response Called after creating a Stripe customer.
woocommerce_stripe_add_source (code) $stripe_customer_id$wc_token$response$source_id Called after creating/attaching a source to a customer.
wc_stripe_delete_source (code) $stripe_customer_id$response Called after deleting a source from customer.
wc_stripe_set_default_source (code) $stripe_customer_id$response Called after setting a default source to a customer.
wc_gateway_stripe_process_redirect_payment (code) $response$order Called after a redirect payment process.
wc_gateway_stripe_process_redirect_payment_error (code) $error$order Called after a failed redirect payment process.
woocommerce_stripe_process_manual_capture (code) $order$result Called after a manual capture of a charge within admin order.
woocommerce_stripe_process_manual_cancel (code) $order Called after a cancel of the order that is authorized and not yet captured.
wc_gateway_stripe_process_webhook_payment (code) $response$order Called after a webhook payment process.
wc_gateway_stripe_process_webhook_payment_error (code) $order$notification$error Called after a webhook payment process error.
wc_stripe_detach_payment_method (code) $customer_id$stripe_response Called after we detach a payment method from a customer.

Supported Filters

Filter Parameter(s) Description
wc_stripe_save_to_account_text (code) $text Text that shows to customers next to the save payment information checkbox.
wc_stripe_payment_icons (code) $icons_array Icons that show next to each payment method.
wc_stripe_send_stripe_receipt (code) $bool Whether to send a receipt via Stripe.
wc_stripe_payment_metadata (code) $metadata$order$prepared_source Metadata that gets passed during an express checkout.
wc_stripe_generate_payment_request (code) $post_data$order$prepared_source Post data that gets passed during an express checkout.
wc_stripe_use_default_customer_source (code) $use_default Whether to use default customer source if source not found.
wc_stripe_refund_request (code) $request$order Request parameters when refund is requested.
wc_stripe_PAYMENT_METHOD_upe_supported_currencies (code) $currencies The supported currencies for that specific payment method.
wc_stripe_display_save_payment_method_checkbox (code) $bool Whether to show the save payment method checkbox.
wc_stripe_allow_prepaid_card (code) $bool Whether to allow prepaid credit card to be used.
wc_stripe_params (code) $params Localized JS key/value pair.
wc_stripe_hide_display_order_fee (code) $bool$order_id Whether to hide the display order fee in orders view.
wc_stripe_hide_display_order_payout (code) $bool$order_id Whether to hide the display order payout in orders view.
woocommerce_stripe_request_headers (code) $headers_args Headers parameters for cURL requests.
wc_stripe_idempotency_key (code) $key_string$request The string for the idempotency key on request.
woocommerce_stripe_request_body (code) $request$api The request body to pass when doing a request.
wc_stripe_customer_metadata (code) $metadata$user The meta data used when creating a customer.
wc_stripe_create_customer_args (code) $args The arguments used when creating a customer.
wc_stripe_localized_messages (code) $localized_messages The messages used from Stripe responses.
wc_stripe_logging (code) $bool$message Whether to log a specific message when logging is enabled.
wc_stripe_webhook_review_change_order_status (code) $bool$order$notification Whether to change the order status when order review event happens.
wc_stripe_payment_request_total_label_suffix (code) $suffix Label suffix to use when express checkout is engaged.
wc_stripe_payment_request_total_label (code) $label The total label to use when express checkout is engaged.
wc_stripe_payment_request_supported_types (code) $types The product types express checkout supports.
wc_stripe_payment_request_hide_itemization (code) $bool Whether to show itemizations when using express checkouts.
wc_stripe_save_to_subs_text (code) $text Text that shows to customers next to the checkbox to update all active subscriptions with the new saved card.
wc_stripe_save_to_subs_checked (code) $bool Whether to have the checkbox to update all active subscriptions with the new saved card be checked by default.
wc_stripe_update_subs_payment_method_card_statuses (code) $statuses Which subscriptions will have their payment method updated if the customer chose that option when adding a new payment method. By default, only the “active” subscriptions will be updated.
wc_stripe_allowed_payment_processing_statuses (code) $order_statuses The order statuses that will allow a payment to be processed. Defaults to pending and failed, but some payment methods add on_hold.
wc_stripe_should_hide_express_checkout_button_based_on_tax_setup (code) $hide_based_on_tax Whether to hide (or show) express checkout for virtual products that are taxable and taxes are based on the billing address.

Deprecated Filters

Filter Parameter(s) Description Replacement Filter
wc_stripe_PAYMENT_METHOD_supported_currencies (code) $currencies The supported currencies for that specific payment method. wc_stripe_PAYMENT_METHOD_upe_supported_currencies
wc_stripe_force_save_source (code) $force_save_source$customer Override force save customer. wc_stripe_force_save_payment_method
wc_stripe_hide_payment_request_on_product_page (code) $bool Whether to hide express checkout button on product detail page.
wc_stripe_show_payment_request_on_checkout (code) $bool Whether to show express checkout button on checkout page.
wc_stripe_show_payment_request_on_cart (code) $bool Manage the display of payment request buttons in cart
wc_stripe_description (code) $description$payment_method_id Override the description of credit card payments.
wc_stripe_payment_request_params (code) $params Localized JS key/value pair.
wc_stripe_sepa_mandate_notification (code) $method The method to use to inform customer of the SEPA mandate.
wc_stripe_PAYMENT_METHOD_settings (code) $settings Admin settings for payment method.
wc_stripe_elements_options (code) Additional options to manipulate Stripe elements.
wc_stripe_elements_styling (code) Additional options to manipulate the Stripe elements styling.
wc_stripe_elements_classes (code) Additional options to add classes to the Stripe elements.