1. Documentation /
  2. Stripe WooCommerce Extension /
  3. Customizing the Stripe WooCommerce Extension /
  4. What hooks and filters are available in the Stripe WooCommerce Extension?

What hooks and filters are available in the Stripe WooCommerce Extension?

This section describes all hooks available to you if you need to manipulate how the Stripe WooCommerce Extension 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.

Action Hooks

↑ Back to top
Hook NameHook Parameter(s)Hook Description
wc_gateway_stripe_process_response$stripe_response
$order
The response we get back after calling a charge request to Stripe.
woocommerce_credit_card_form_start$gateway_idBefore showing the credit card form.
woocommerce_credit_card_form_end$gateway_idAfter showing the credit card form.
wc_gateway_stripe_process_payment$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$error
$order
Called when an error occurs during the process payment event.
woocommerce_stripe_add_customer$args
$response
Called after creating a Stripe customer.
woocommerce_stripe_add_source$stripe_customer_id
$wc_token
$response
$source_id
Called after creating/attaching a source to a customer.
wc_stripe_delete_source$stripe_customer_id
$response
Called after deleting a source from customer.
wc_stripe_set_default_source$stripe_customer_id
$response
Called after setting a default source to a customer.
wc_gateway_stripe_process_redirect_payment$response
$order
Called after a redirect payment process.
wc_gateway_stripe_process_redirect_payment_error$error
$order
Called after a failed redirect payment process.
woocommerce_stripe_process_manual_capture$order
$result
Called after a manual capture of a charge within admin order.
woocommerce_stripe_process_manual_cancel$orderCalled after a cancel of the order that is authorized and not yet captured.
wc_gateway_stripe_process_webhook_payment$response
$order
Called after a webhook payment process.
wc_gateway_stripe_process_webhook_payment_error$order
$notification
*$e
Called after a webhook payment process error.

Filter Hooks

↑ Back to top
Hook NameHook Parameter(s)Hook Description
wc_stripe_save_to_account_text$textText that shows to customers next to the save payment information checkbox.
wc_stripe_payment_icons$icons_arrayIcons that show next to each payment method.
wc_stripe_send_stripe_receipt$boolWhether to send a receipt via Stripe.
wc_stripe_payment_metadata$metadata
$order
$prepared_source
Metadata that gets passed during an express checkout.
wc_stripe_generate_payment_request$post_data
$order
$prepared_source
Post data that gets passed during an express checkout.
wc_stripe_owner_details$details
$order
The owner details of an order.
wc_stripe_force_save_source$force_save_source
$customer
Override force save customer.
wc_stripe_use_default_customer_source$use_defaultWhether to use default customer source if source not found.
wc_stripe_refund_request$request
$order
Request parameters when refund is requested.
wc_stripe_PAYMENT_METHOD_settings$settingsAdmin settings for payment method.
wc_stripe_description$description
$payment_method_id
Override the description of credit card payments.
wc_stripe_display_save_payment_method_checkbox$boolWhether to show the save payment method checkbox.
wc_stripe_sepa_mandate_notification$methodThe method to use to inform customer of the SEPA mandate.
wc_stripe_allow_prepaid_card$boolWhether to allow prepaid credit card to be used.
wc_stripe_elements_optionsAdditional options to manipulate Stripe elements.
wc_stripe_elements_stylingAdditional options to manipulate the Stripe elements styling.
wc_stripe_elements_classesAdditional options to add classes to the Stripe elements.
wc_stripe_params$paramsLocalized JS key/value pair.
wc_stripe_payment_request_params$paramsLocalized JS key/value pair.
wc_stripe_hide_display_order_fee$bool
$order_id
Whether to hide the display order fee in orders view.
wc_stripe_hide_display_order_payout$bool
$order_id
Whether to hide the display order payout in orders view.
woocommerce_stripe_request_headers$headers_argsHeaders parameters for cURL requests.
wc_stripe_idempotency_key$key_string
$request
The string for the idempotency key on request.
woocommerce_stripe_request_body$request
$api
The request body to pass when doing a request.
wc_stripe_customer_metadata$metadata
$user
The meta data used when creating a customer.
wc_stripe_create_customer_args$argsThe arguments used when creating a customer.
wc_stripe_localized_messages$localized_messagesThe messages used from Stripe responses.
wc_stripe_logging$bool
$message
Whether to log a specific message when logging is enabled.
wc_stripe_webhook_review_change_order_status$bool
$order
$notification
Whether to change the order status when order review event happens.
wc_stripe_PAYMENT_METHOD_supported_currencies$currenciesThe supported currencies for that specific payment method.
wc_stripe_payment_request_total_label_suffix$suffixLabel suffix to use when express checkout is engaged.
wc_stripe_payment_request_total_label$labelThe total label to use when express checkout is engaged.
wc_stripe_payment_request_supported_types$typesThe product types express checkout supports.
wc_stripe_hide_payment_request_on_product_page$boolWhether to hide express checkout button on product detail page.
wc_stripe_show_payment_request_on_checkout$boolWhether to show express checkout button on checkout page.
wc_stripe_payment_request_hide_itemization$boolWhether to show itemizations when using express checkouts.
wc_stripe_save_to_subs_text$textText that shows to customers next to the checkbox to update all active subscriptions with the new saved card.
wc_stripe_save_to_subs_checked$boolWhether 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$statusesWhich 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_show_payment_request_on_cart$boolManage the display of payment request buttons in cart