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

WooCommerce Stripe Gateway Hook Reference

Generated for release 10.9.0 (Commit: 836a0cfe6a6f2e574d1d8dd8e6604a8ad1428bbe)

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.

Contents

Actions #
Filters #
Deprecated Actions #
Deprecated Filters #

Actions

wc_gateway_stripe_process_payment_authentication_required

Fires when a Stripe payment requires customer authentication.

Parameters

Name Type Description
order WC_Order The order that requires authentication.
response object|array|null Stripe API response.

Source locations

File Arguments
includes/compat/trait-wc-stripe-subscriptions.php 2
includes/compat/trait-wc-stripe-subscriptions.php 1
includes/compat/trait-wc-stripe-pre-orders.php 1

wc_gateway_stripe_process_payment_charge

Allow third-party code to add custom logic before processing the charge data from Stripe.

Parameters

Name Type Description
response object The Charge response from Stripe.
order WC_Order The Order object.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 2

wc_gateway_stripe_process_payment_error

Fires after Stripe payment processing fails for an order.

Parameters

Name Type Description
e WC_Stripe_Exception The exception raised during payment processing.
order WC_Order The order that failed payment processing.

Source locations

File Arguments
includes/compat/trait-wc-stripe-subscriptions.php 2
includes/compat/trait-wc-stripe-subscriptions.php 2
includes/class-wc-stripe-intent-controller.php 2
includes/abstracts/abstract-wc-stripe-payment-gateway-voucher.php 2
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 2
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 2

wc_gateway_stripe_process_payment_intent_incomplete

Fires when PaymentIntent webhook processing is deferred while the order awaits action.

Parameters

Name Type Description
order WC_Order Order associated with the PaymentIntent.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 1

wc_gateway_stripe_process_payment_intent_requires_action

Fires when a PaymentIntent webhook reports that payment requires action.

Parameters

Name Type Description
order WC_Order Order associated with the PaymentIntent.
intent object Stripe PaymentIntent object.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 2

wc_gateway_stripe_process_payment_subscription_charge_attempt_delayed

Fires when a subscription charge attempt is delayed by Stripe.

Parameters

Name Type Description
response object|array Stripe API response.
renewal_order WC_Order Renewal order associated with the charge attempt.

Source locations

File Arguments
includes/compat/trait-wc-stripe-subscriptions.php 2

wc_gateway_stripe_process_redirect_payment_error

Fires after redirect payment processing fails.

Parameters

Name Type Description
exception WC_Stripe_Exception The exception raised during redirect payment processing.
order WC_Order The order that failed payment processing.

Source locations

File Arguments
includes/class-wc-stripe-order-handler.php 2

wc_gateway_stripe_process_response

Fires after a Stripe charge response is processed.

Parameters

Name Type Description
response object Stripe charge response.
order WC_Order Order associated with the charge.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 2

wc_gateway_stripe_process_webhook_payment_error

Fires after webhook payment processing fails.

Parameters

Name Type Description
order WC_Order Order that failed webhook payment processing.
notification object Stripe webhook notification.
e WC_Stripe_Exception|null When available, the exception raised during webhook processing.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 3
includes/class-wc-stripe-webhook-handler.php 3
includes/class-wc-stripe-webhook-handler.php 3
includes/class-wc-stripe-webhook-handler.php 3
includes/class-wc-stripe-webhook-handler.php 3
includes/class-wc-stripe-webhook-handler.php 3
includes/class-wc-stripe-webhook-handler.php 3

wc_stripe_add_payment_method_{$payment_method_id}_success

Fires after adding a payment method succeeds.

The dynamic portion of the hook name is the payment method ID.

Parameters

Name Type Description
source_id string Stripe source ID.
source_object object Stripe source object.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 2

wc_stripe_after_set_payment_method_title_for_confirmed_intent

Fires after the payment method title is set on a confirmed intent, allowing extensions (e.g. express checkout) to override the title for special cases.

Since: 10.8.0

Parameters

Name Type Description
order WC_Order The order or subscription being processed.
payment_method_type string The Stripe payment method type.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 2

wc_stripe_agentic_commerce_initialized

Fires after Agentic Commerce integration is initialized.

Since: 10.5.0

Parameters

Name Type Description
integration WC_Stripe_Agentic_Commerce_Integration The integration instance.

Source locations

File Arguments
includes/class-wc-stripe.php 1

wc_stripe_agentic_order_created

Fires after an agentic commerce order is created from a checkout session.

Since: 10.6.0

Parameters

Name Type Description
order WC_Order The created order.
session WC_Stripe_Agentic_Checkout_Session The checkout session wrapper.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 2

wc_stripe_agentic_order_creation_failed

Fires when agentic commerce order creation fails.

Since: 10.6.0

Parameters

Name Type Description
e Throwable The throwable that was thrown.
session WC_Stripe_Agentic_Checkout_Session The checkout session wrapper.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 2

wc_stripe_change_subs_payment_method_success

Fires after a subscription payment method is changed successfully.

Parameters

Name Type Description
source string Stripe source or payment method ID.
prepared_source object Prepared source object.

Source locations

File Arguments
includes/compat/trait-wc-stripe-subscriptions.php 2
includes/compat/trait-wc-stripe-subscriptions.php 2

wc_stripe_delete_source

Fires after a source is detached from a Stripe customer.

Parameters

Name Type Description
customer_id string Stripe customer ID.
response stdClass|array Stripe API response.

Source locations

File Arguments
includes/class-wc-stripe-customer.php 2

wc_stripe_detach_payment_method

Fires after a payment method is detached from a Stripe customer.

Parameters

Name Type Description
customer_id string Stripe customer ID.
response stdClass|array Stripe API response.

Source locations

File Arguments
includes/class-wc-stripe-customer.php 2

wc_stripe_express_checkout_after_checkout_validation

Allow third-party plugins to validate custom checkout data for express checkout orders.

To be used as a stand-in for the woocommerce_after_checkout_validation action.

Since: 9.6.0

Parameters

Name Type Description
custom_checkout_data array The custom checkout data.
errors WP_Error The WP_Error object, for adding errors when validation fails.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-custom-fields.php 2

wc_stripe_express_checkout_update_order_meta

Allow third-party plugins to add custom checkout data for express checkout orders.

To be used as a stand-in for the woocommerce_checkout_update_order_meta action.

Since: 9.6.0

Parameters

Name Type Description
order_id int The order ID.
custom_checkout_data array The custom checkout data.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-custom-fields.php 2

wc_stripe_gateway_admin_options_wrapper

Fires when rendering the Stripe gateway admin options wrapper.

Parameters

Name Type Description
gateway WC_Stripe_UPE_Payment_Gateway Stripe UPE payment gateway instance.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 1

wc_stripe_paid_order_cancellation_prevented

Fires when a paid Stripe order stuck at pending is prevented from being auto-cancelled as unpaid.

Since: 10.8.0

Parameters

Name Type Description
order WC_Order The paid order whose cancellation was prevented.

Source locations

File Arguments
includes/class-wc-stripe-order-handler.php 1

wc_stripe_payment_fields_{$gateway_id}

Fires after Stripe payment fields are rendered.

The dynamic portion of the hook name is the gateway ID, which will generally be 'stripe'.

Parameters

Name Type Description
gateway_id string Gateway ID.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-method-blik.php 1
includes/payment-methods/class-wc-stripe-upe-payment-method-acss.php 1
includes/payment-methods/class-wc-stripe-upe-payment-method.php 1
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 1

wc_stripe_set_default_payment_method

Fires after a customer's default payment method is updated in Stripe.

Parameters

Name Type Description
customer_id string Stripe customer ID.
response stdClass|array Stripe API response.

Source locations

File Arguments
includes/class-wc-stripe-customer.php 2

wc_stripe_set_default_source

Fires after a customer's default source is updated in Stripe.

Parameters

Name Type Description
customer_id string Stripe customer ID.
response stdClass|array Stripe API response.

Source locations

File Arguments
includes/class-wc-stripe-customer.php 2

wc_stripe_subscription_renewal_blocked_by_radar

Fires when a subscription renewal payment is blocked by Stripe Radar.

Parameters

Name Type Description
renewal_order WC_Order The renewal order blocked by Radar.
response object|null The Stripe API error response.
radar_reason string The Radar block reason (e.g. 'rule', 'highest_risk_level').

Source locations

File Arguments
includes/compat/trait-wc-stripe-subscriptions.php 3

wc_stripe_unexpected_charge_detected

Fires when an asynchronously-confirmed Stripe charge is detected on an order that was already paid via a different gateway, leaving an unexpected charge that the merchant needs to remediate. Triggered at most once per PaymentIntent per order.

Since: 10.8.0

Parameters

Name Type Description
order WC_Order The order paid via a non-Stripe gateway.
charge object The Stripe Charge object.
webhook_type string The Stripe webhook event type ('charge.succeeded' or 'charge.captured').

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 3

wc_stripe_webhook_received

Fires after a webhook has been processed, but before we respond to Stripe.

This allows for custom processing of the webhook after it has been processed. Note that the $order parameter may be null in various cases, especially when processing webhooks unrelated to orders, such as account updates.

Since: 9.8.0

Parameters

Name Type Description
webhook_type string The type of webhook that was processed.
notification object The webhook data sent from Stripe.
order WC_Order|null The order being processed by the webhook.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 3

woocommerce_stripe_add_customer

Fires after a Stripe customer is created.

Parameters

Name Type Description
args array Arguments sent to the Stripe Customers API.
response stdClass|array Stripe customer response.

Source locations

File Arguments
includes/class-wc-stripe-customer.php 2

woocommerce_stripe_add_payment_method

Fires after a Stripe payment method is added for a customer.

Parameters

Name Type Description
user_id int User ID.
payment_method_object object Stripe PaymentMethod object.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 2
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 2
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 2
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 2

woocommerce_stripe_add_source

Fires after a payment source is added to a Stripe customer.

Parameters

Name Type Description
customer_id string Stripe customer ID.
wc_token WC_Payment_Token|false WooCommerce payment token, or false when no token was saved.
response stdClass|array Stripe source or payment method response.
source_id string Stripe source or payment method ID.

Source locations

File Arguments
includes/class-wc-stripe-customer.php 4

woocommerce_stripe_process_manual_cancel

Fires after a manually canceled Stripe pre-authorization is processed.

Parameters

Name Type Description
order WC_Order Order associated with the manual cancellation.

Source locations

File Arguments
includes/class-wc-stripe-order-handler.php 1

woocommerce_stripe_process_manual_capture

Fires after a manually captured Stripe charge is processed.

Parameters

Name Type Description
order WC_Order Order associated with the manual capture.
result object Stripe capture response.

Source locations

File Arguments
includes/class-wc-stripe-order-handler.php 2

woocommerce_stripe_updated

Action triggered when the plugin is updated.

Source locations

File Arguments
includes/class-wc-stripe-update-manager.php 0

woocommerce_stripe_update_customer

Fires after a Stripe customer is updated.

Parameters

Name Type Description
args array Arguments sent to the Stripe Customers API.
response stdClass|array Stripe customer response.

Source locations

File Arguments
includes/class-wc-stripe-customer.php 2

Filters

wc_stripe_abilities_enabled

Filter whether Stripe's Abilities API registrations are active.

Composes with the _wcstripe_feature_abilities option: pass the option-derived bool through this filter to flip the result regardless of the stored option value.

Since: 10.8.0

Parameters

Name Type Description
enabled bool Whether to register Stripe abilities.

Source locations

File Arguments
includes/class-wc-stripe-feature-flags.php 1

wc_stripe_adaptive_pricing_email_notice_styles

Filters the inline styles applied to the adaptive pricing currency conversion notice in order emails.

Since: 10.6.0

Parameters

Name Type Description
styles array { Associative array of CSS property => value pairs. @type string $border-color Border colour (hex or CSS colour value). Default '#007CBA'. @type string $border-radius Border radius. Default '4px'. @type string $background-color Background colour (hex or CSS colour value). Default '#F6F5F8'. }
order WC_Abstract_Order The order the email is being sent for.
sent_to_admin bool Whether the email is sent to admin.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 3

wc_stripe_add_payment_method_on_error_rate_limit_delay

Filter the rate limit delay after a failure adding a payment method.

Since: 9.7.0

Parameters

Name Type Description
rate_limit_delay int The rate limit delay in seconds.
e WC_Stripe_Exception The exception that occurred.

Source locations

File Arguments
includes/class-wc-stripe-intent-controller.php 2

wc_stripe_agentic_approve_order

Filters the manual approval decision for an agentic checkout order.

Return null to approve, or an array with 'code' and 'reason' keys to decline. Example: [ 'code' => 'not_purchasable', 'reason' => 'Product is not available.' ]

Since: 10.6.0

Parameters

Name Type Description
decline array|null Null to approve, or array with 'code' and 'reason'.
event WC_Stripe_Agentic_Customize_Checkout_Event The finalize checkout event.
invalid_line_item WC_Stripe_Agentic_Customize_Checkout_Line_Item|null The line item that failed validation, or null.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-manual-approval.php 3

wc_stripe_agentic_commerce_feed_cache_ttl

Filters the max age of the cached upload record before dedup is bypassed.

Since: 10.8.0

Parameters

Name Type Description
ttl_seconds int Default self::FEED_CACHE_TTL.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-integration.php 1

wc_stripe_agentic_commerce_feed_dedupe_enabled

Filter whether the unchanged-feed deduplication is enabled.

Set to false to force every sync cycle to upload to the Stripe Files API, regardless of whether the feed content has changed.

Since: 10.8.0

Parameters

Name Type Description
enabled bool Default true.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-integration.php 1

wc_stripe_agentic_commerce_feed_sync_interval

Filter the recurring sync interval (in seconds) used when scheduling or rescheduling Agentic Commerce product synchronization.

Since: 10.7.0

Parameters

Name Type Description
sync_interval int Default sync interval in seconds.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-integration.php 1

wc_stripe_agentic_commerce_files_api_pre_request

Allows the Files API request to be short-circuited (e.g. for testing).

Since: 10.5.0

Parameters

Name Type Description
pre array|null Short-circuit response or null.
file_path string The path to the feed file.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-files-api-delivery.php 2

wc_stripe_agentic_commerce_import_set_pre_request

Allows the ImportSet API request to be short-circuited (e.g. for testing).

Since: 10.7.0

Parameters

Name Type Description
pre array|null Short-circuit response or null.
file_id string Stripe file ID.
standard_data_format string Feed format string.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-files-api-delivery.php 3

wc_stripe_agentic_commerce_map_product

Filter mapped product data before validation.

Since: 10.5.0

Parameters

Name Type Description
row array Mapped product data.
product WC_Product Product object.
parent_product WC_Product|null Parent product for variations.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-product-mapper.php 3

wc_stripe_agentic_commerce_product_filter

Filter the resolved set of filter inputs before resolution runs.

Note that data returned from this filter is still normalized, so will be dropped if it is invalid. The args produced by the resolver still pass through the lower-level wc_stripe_agentic_commerce_product_query_args filter for full escape-hatch control over the final wc_get_products() arguments.

Since: 10.9.0

Parameters

Name Type Description
filters array { Normalized filters derived from the persisted option. @type int[] $product_ids Product IDs. @type int[] $category_ids Category taxonomy IDs. @type int[] $tag_ids Tag taxonomy IDs. @type int[] $brand_ids Brand taxonomy IDs. @type int[] $variable_product_ids Variable product IDs. }

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-product-filter.php 1

wc_stripe_agentic_commerce_product_query_args

Filter product feed query arguments. Note that complex filters may already exist, so care should be taken to ensure that any overrides applied via this filter don't clash with the existing values in a way that would generate no results.

Since: 10.5.0

Parameters

Name Type Description
args array WC_Product_Query arguments.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-integration.php 1

wc_stripe_agentic_commerce_sync_history_limit

Filter the maximum number of sync history entries to retain.

Since: 10.7.0

Parameters

Name Type Description
limit int Default history limit.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-integration.php 1

wc_stripe_agentic_commerce_tax_code

Filter to map WooCommerce tax class to Stripe tax code.

Since: 10.5.0

Parameters

Name Type Description
tax_code string|null Stripe tax code (format: txcd_99999999) or null.
tax_class string WooCommerce tax class.
product WC_Product Product object.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-product-mapper.php 3

wc_stripe_agentic_commerce_validation_errors

Filter validation errors.

Since: 10.5.0

Parameters

Name Type Description
errors array Validation error messages.
row array Product data row.
product WC_Product Product object.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-feed-validator.php 3

wc_stripe_allowed_payment_processing_statuses

Filters the valid order statuses for payment processing.

Since: 9.7.0

Parameters

Name Type Description
allowed_payment_processing_statuses array The allowed payment processing statuses.
order WC_Order The order object.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 2
includes/class-wc-stripe-webhook-handler.php 2

wc_stripe_allow_prepaid_card

Filters whether prepaid cards are accepted.

Parameters

Name Type Description
allow_prepaid_card bool Whether prepaid cards are accepted.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 1

wc_stripe_auto_refund_cancelled_order

Filters whether a late Stripe payment on a cancelled order is automatically refunded.

Return false to leave the payment in place (e.g. to reconcile it manually) instead of refunding the charge or voiding the authorisation.

Since: 10.9.0

Parameters

Name Type Description
auto_refund bool Whether to refund the payment automatically. Default true.
order WC_Order The cancelled order that received the payment.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 2

wc_stripe_calculated_total

Filters the calculated total for the order.

Since: 9.6.0

Parameters

Name Type Description
calculated_total float The calculated total.
order_total float The order total.
cart WC_Cart The cart object.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 3

wc_stripe_checkout_session_expired_should_send_cancelled_order_email_to_customer

Whether to email the customer when an order is cancelled because its Stripe Checkout Session expired. This only applies to immediate, non-deferred WooCommerce email sends when the customer cancelled order email is enabled.

Since: 10.9.0

Parameters

Name Type Description
should_send bool Whether to send the email. Default false.
order WC_Order The cancelled order.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 2

wc_stripe_checkout_session_expired_should_send_cancelled_order_email_to_merchant

Whether to email the merchant when an order is cancelled because its Stripe Checkout Session expired. This only applies to immediate, non-deferred WooCommerce email sends when the merchant cancelled order email is enabled.

Since: 10.9.0

Parameters

Name Type Description
should_send bool Whether to send the email. Default false.
order WC_Order The cancelled order.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 2

wc_stripe_connection_refresh_interval

Filters the frequency with which the App OAuth connection should be refreshed.

Access tokens expire in 1 hour, and there seem to be no way to customize that from the Stripe Dashboard: https://docs.stripe.com/stripe-apps/api-authentication/oauth#refresh-access-token We schedule the connection refresh every 55 minutues.

Since: 8.6.0

Parameters

Name Type Description
interval int refresh interval

Source locations

File Arguments
includes/connect/class-wc-stripe-connect.php 1

wc_stripe_create_customer_args

Filters the arguments used to create a customer.

Since: 4.0.0

Parameters

Name Type Description
args array The arguments used to create a customer.

Source locations

File Arguments
includes/class-wc-stripe-customer.php 1

wc_stripe_create_customer_disallowed_order_statuses

Filters order statuses that cannot be used when creating a Stripe customer from an order.

Parameters

Name Type Description
disallowed_order_statuses string[] Order statuses that cannot create a customer.

Source locations

File Arguments
includes/admin/class-wc-rest-stripe-orders-controller.php 1

wc_stripe_create_customer_required_fields

Filters the required customer fields when creating a customer in Stripe.

Since: 9.7.0, 10.2.0

Parameters

Name Type Description
required_fields array The required customer fields as derived from the required billing fields in checkout. In some contexts, like adding a payment method, we allow minimal details to be provided.
create_customer_request array The initial data to build the customer request. This can be used to provide country-specific conditions.

Source locations

File Arguments
includes/class-wc-stripe-customer.php 2

wc_stripe_customer_metadata

Filters the metadata added to a Stripe customer request.

Parameters

Name Type Description
metadata array Customer metadata.
user WP_User|null WordPress user associated with the customer, if any.

Source locations

File Arguments
includes/class-wc-stripe-customer.php 2

wc_stripe_database_cache_is_expired

Filters the result of the database cache entry expiration check.

Since: 9.7.0

Parameters

Name Type Description
is_expired bool Whether the cache is expired.
prefixed_key string The cache key (with prefix).
cache_contents array The cache contents.

Source locations

File Arguments
includes/class-wc-stripe-database-cache.php 3

wc_stripe_database_cache_prefetch_window

Filters the cache prefetch window for a given cache key. Return 0 or less to disable prefetching for the key.

Since: 10.2.0

Parameters

Name Type Description
prefetch_window int The prefetch window for the cache key.
cache_key string The unprefixed cache key.

Source locations

File Arguments
includes/class-wc-stripe-database-cache-prefetch.php 2

wc_stripe_detached_subscriptions_maximum_count

Maximum number of subscriptions to process.

Since: 9.7.0

Parameters

Name Type Description
max_count int The maximum number of subscriptions to process.

Source locations

File Arguments
includes/class-wc-stripe-status.php 1

wc_stripe_detached_subscriptions_maximum_time

Filter the maximum time allowed for fetching detached subscriptions.

Since: 9.7.0

Parameters

Name Type Description
max_time int The maximum time allowed in seconds. Default is server's max_execution_time (when available, or 30 if not) minus 5 seconds.

Source locations

File Arguments
includes/compat/class-wc-stripe-subscriptions-helper.php 1

wc_stripe_display_save_payment_method_checkbox

Filters whether the save payment method checkbox should be displayed.

Parameters

Name Type Description
display bool Whether the save payment method checkbox should be displayed.

Source locations

File Arguments
includes/class-wc-stripe-blocks-support.php 1

wc_stripe_display_update_subs_payment_method_card_checkbox

Filters whether to display the checkbox for updating current subscriptions.

Parameters

Name Type Description
display bool Whether to display the checkbox.

Source locations

File Arguments
includes/compat/trait-wc-stripe-subscriptions.php 1

wc_stripe_elements_classes

Filters Stripe Elements CSS classes.

Parameters

Name Type Description
classes array|false Stripe Elements classes, or false to use defaults.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 1

wc_stripe_elements_options

Filters Stripe Elements options.

Parameters

Name Type Description
options array Stripe Elements options.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 1

wc_stripe_elements_styling

Filters Stripe Elements styling.

Parameters

Name Type Description
styles array|false Stripe Elements styling, or false to use defaults.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 1

wc_stripe_expand_ocs_in_legacy_checkout

Filter to control whether the Optimized Checkout Suite should be expanded in the legacy checkout.

Since: 10.6.0

Parameters

Name Type Description
always_expand_ocs_in_legacy_checkout bool Whether the Optimized Checkout Suite should be expanded in the legacy checkout.

Source locations

File Arguments
includes/class-wc-stripe-feature-flags.php 1

wc_stripe_express_checkout_add_to_cart_sold_individually_quantity

Filters the quantity for sold-individually products in Express Checkout add-to-cart previews.

Since: 10.6.0

Parameters

Name Type Description
quantity int|float Quantity to add.
requested int|float Requested quantity.
product_id int Product ID.
variation_id int|null Variation ID, if any.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-ajax-handler.php 4

wc_stripe_express_checkout_countries_with_optional_postcode

Filters countries where postcodes are optional in Express Checkout.

Parameters

Name Type Description
country_codes string[] Country codes where postcodes are optional.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-ajax-handler.php 1

wc_stripe_express_checkout_enable_classic_checkout_custom_fields

Determines whether express checkout orders should process or ignore custom, classic checkout fields. Enabled by default; return false to opt out.

Since: 9.7.0

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-element.php 1

wc_stripe_express_checkout_hide_itemization

Filters whether Express Checkout itemization should be hidden.

Parameters

Name Type Description
hide_itemization bool Whether itemization should be hidden.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 1

wc_stripe_express_checkout_normalize_address

Filters the address data for express checkout after the standard normalization logic has been applied.

NOTE: This data is immediately returned to the client, so be careful with the filter implementation, as it can cause issues for express checkout flows. Also ensure that data is correctly sanitized and checked as it will be visible to shoppers.

Since: 10.2.0

Parameters

Name Type Description
normalized_data array The normalized address data.
data array The original address data sent from the client before normalization.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-ajax-handler.php 2

wc_stripe_express_checkout_params

Filters the Express Checkout JavaScript parameters.

Parameters

Name Type Description
params array Express Checkout JavaScript parameters.

Source locations

File Arguments
includes/class-wc-stripe-blocks-support.php 1

wc_stripe_force_save_payment_method

Filters the flag that decides if the payment method must be saved in all possible situations.

Since: 9.6.0

Parameters

Name Type Description
force_save bool Whether the payment method must be saved.
order_id string Order ID.

Source locations

File Arguments
includes/class-wc-stripe-helper.php 2

wc_stripe_generate_create_intent_request

Filter the return value of the WC_Payment_Gateway_CC::generate_create_intent_request.

Since: 3.1.0

Parameters

Name Type Description
request array
order WC_Order
source object

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 3
includes/abstracts/abstract-wc-stripe-payment-gateway.php 3

wc_stripe_generate_payment_request

Filter the return value of the WC_Payment_Gateway_CC::generate_payment_request.

Since: 3.1.0

Parameters

Name Type Description
post_data array
order WC_Order
source object

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 3

wc_stripe_hide_display_order_fee

Filters whether the Stripe fee should be hidden on the order screen.

Parameters

Name Type Description
hide bool Whether to hide the Stripe fee.
order_id int Order ID.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 2

wc_stripe_hide_display_order_payout

Filters whether the Stripe payout should be hidden on the order screen.

Parameters

Name Type Description
hide bool Whether to hide the Stripe payout.
order_id int Order ID.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 2

wc_stripe_hide_payment_request_on_product_page

Filters whether payment request buttons should be hidden on product pages.

Parameters

Name Type Description
hide bool Whether to hide payment request buttons.
post WP_Post|null Current post object, if available.

Source locations

File Arguments
includes/class-wc-stripe.php 2

wc_stripe_idempotency_key

Filters the idempotency key sent with a Stripe API request.

Parameters

Name Type Description
idempotency_key string|null Generated idempotency key.
request array Stripe API request body.

Source locations

File Arguments
includes/class-wc-stripe-api.php 2

wc_stripe_intent_metadata

Filters metadata added to Stripe intents.

Parameters

Name Type Description
metadata array Intent metadata.
order WC_Order Order associated with the intent.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 2

wc_stripe_is_adaptive_pricing_supported

Filter to opt out from Adaptive Pricing for the current cart content.

Since: 10.9.0

Parameters

Name Type Description
is_supported bool Whether Adaptive Pricing is supported for the current cart. Always true.
cart WC_Cart|null The current cart, or null if unavailable.

Source locations

File Arguments
includes/class-wc-stripe-helper.php 2

wc_stripe_is_agentic_commerce_enabled

Filter to control the availability of the Agentic Commerce feature.

Since: 10.5.0

Parameters

Name Type Description
enabled bool Whether Agentic Commerce is enabled. Default false.

Source locations

File Arguments
includes/class-wc-stripe-feature-flags.php 1

wc_stripe_is_optimized_checkout_available

Filter to control the availability of the Optimized Checkout feature.

Since: 9.6.0

Parameters

Name Type Description
default_value bool The default value for the feature flag.
default_pmc string The default value of the 'pmc_enabled' setting passed to the filter.
pmc_enabled string The actual value of the 'pmc_enabled' setting.

Source locations

File Arguments
includes/class-wc-stripe-feature-flags.php 3

wc_stripe_is_valid_create_and_confirm_setup_intent_captcha

Filter to validate captcha for create and confirm setup intent requests.

Can be used by third-party plugins to add captcha validation.

Since: 10.1.0

Parameters

Name Type Description
is_captcha_valid bool True if the captcha is valid, false otherwise. Default is true.

Source locations

File Arguments
includes/class-wc-stripe-intent-controller.php 1

wc_stripe_is_verbose_debug_mode_enabled

Filters the flag that decides if the verbose debug mode is enabled.

Since: 10.1.0

Parameters

Name Type Description
enabled bool True if enabled, false otherwise.

Source locations

File Arguments
includes/class-wc-stripe-helper.php 1

wc_stripe_load_scripts_on_cart_page_when_prbs_disabled

Filters whether Stripe scripts load on cart pages when payment request buttons are disabled.

Parameters

Name Type Description
should_load bool Whether Stripe scripts should load.

Source locations

File Arguments
includes/class-wc-stripe-helper.php 1

wc_stripe_load_scripts_on_product_page_when_prbs_disabled

Filters whether Stripe scripts load on product pages when payment request buttons are disabled.

Parameters

Name Type Description
should_load bool Whether Stripe scripts should load.

Source locations

File Arguments
includes/class-wc-stripe-helper.php 1

wc_stripe_localized_messages

Filters the localized Stripe error messages exposed to checkout JavaScript.

Parameters

Name Type Description
messages array Stripe error code to localized message map.

Source locations

File Arguments
includes/class-wc-stripe-helper.php 1

wc_stripe_logger_can_log

Filter to determine if logging is allowed.

Extreme care should be taken when implementing hooks against this filter, as it will be called many times per request when a filter is active.

Since: 10.8.0

Parameters

Name Type Description
can_log bool Whether logging is allowed.
log_level string|null The log level to check. Can be one of 'warning', 'notice', 'info', 'debug'.
calling_class string|null The class that called the log method. May be null if the caller is a function.
calling_function string|null The function or method that called the WC_Stripe_Logger log method.

Source locations

File Arguments
includes/class-wc-stripe-logger.php 4

wc_stripe_ocs_non_excludable_payment_methods

Filters the list of additional payment methods that can not be excluded from the Payment Element in optimized checkout.

This list will be added to the base list in {@see \WC_Stripe_Payment_Methods::NON_EXCLUDABLE_PAYMENT_METHOD_TYPES}.

Parameters

Name Type Description
non_excludable_methods string[] List of payment method types that can not be excluded.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 1

wc_stripe_optimized_checkout_title

Filters the Optimized Checkout payment method title.

Allows merchants to override the generic title shown when Optimized Checkout is enabled. The $context argument distinguishes the surface that requested the title ('blocks' for the Blocks/pay-for-order checkout, 'classic' for the classic shortcode checkout label after the gateway is selected).

Since: 10.7.0

Parameters

Name Type Description
title string Default title.
context string One of 'blocks' or 'classic'.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-method-oc.php 2

wc_stripe_owner_details

Filters owner details sent to Stripe.

Parameters

Name Type Description
details array Owner details.
order WC_Order Order used to build the owner details.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 2

wc_stripe_params

Filters the classic checkout JavaScript parameters for Stripe.

Parameters

Name Type Description
params array Stripe JavaScript parameters.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 1

wc_stripe_payment_icons

Filters the Stripe payment method icon HTML strings.

Parameters

Name Type Description
icon_list array Payment method icon HTML keyed by payment method ID.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 1

wc_stripe_payment_metadata

Filter the metadata sent with the Stripe Checkout Session payment intent.

Since: 4.0.0

Parameters

Name Type Description
metadata array The metadata array to be sent with the payment intent.
order WC_Order|null The WC_Order object if available, otherwise null.
prepared_payment_method object|null The prepared payment method object if available, otherwise null.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 3
includes/class-wc-stripe-checkout-session-manager.php 3
includes/ajax-handlers/class-wc-stripe-checkout-sessions-ajax-handler.php 3

wc_stripe_payment_request_button_locale

Filters the Express Checkout button locale.

Parameters

Name Type Description
locale string Two-letter locale code.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 1

wc_stripe_payment_request_level3_data

Filters the Level 3 data based on order.

Example usage: Enables updating the discount based on the products in the order, if any of the products are gift cards.

Since: 8.6.0

Parameters

Name Type Description
level3_data array Precalculated Level 3 data based on order.
order WC_Order The order object.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 2

wc_stripe_payment_request_payment_method_title_suffix

Filters the suffix used for Express Checkout payment method titles.

Parameters

Name Type Description
suffix string Payment method title suffix.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 1

wc_stripe_payment_request_product_data

Filters product data passed to Express Checkout.

Parameters

Name Type Description
data array Express Checkout product data.
product WC_Product Product object.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 2

wc_stripe_payment_request_shipping_posted_values

Filters the posted shipping address values used for Express Checkout shipping calculations.

Parameters

Name Type Description
shipping_address array Shipping address values.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 1

wc_stripe_payment_request_supported_types

Filters product types supported by Express Checkout.

Parameters

Name Type Description
supported_types string[] Supported product types.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 1

wc_stripe_payment_request_total_label

Filters the Express Checkout total label.

Parameters

Name Type Description
label string Total label.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 1

wc_stripe_payment_request_total_label_suffix

Filters the suffix appended to the Express Checkout total label.

Parameters

Name Type Description
suffix string Total label suffix.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 1

wc_stripe_preselect_payment_method_configuration

Allows merchants to specify the ID of a Payment Method Configuration to use. This makes it possible for merchants to create configurations for specific sites, e.g. when they operate sites in different countries with different local payment methods.

Parameters

Name Type Description
preselected_pmc_id string|null The ID of the Payment Method Configuration to use. Null by default, but a string value may be returned.
is_test_mode bool Whether the site is in test mode.

Source locations

File Arguments
includes/class-wc-stripe-payment-method-configurations.php 2

wc_stripe_privacy_eraser_subs_statuses

Filters subscription statuses that retain Stripe personal data during erasure.

Parameters

Name Type Description
statuses string[] Subscription statuses that should retain personal data.

Source locations

File Arguments
includes/admin/class-wc-stripe-privacy.php 1

wc_stripe_process_payment_intent_webhook_async

Filters whether successful PaymentIntent webhook processing should be deferred.

Parameters

Name Type Description
process_async bool Whether to process the webhook asynchronously.
order WC_Order Order associated with the PaymentIntent.
intent object Stripe PaymentIntent object.
notification object Stripe webhook notification.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 4

wc_stripe_refund_request

Filters the Stripe refund request before it is sent.

Parameters

Name Type Description
request array Refund request data.
order WC_Order Order associated with the refund.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 2

wc_stripe_request_body

Filters the request body sent to the Stripe API.

Since: 9.7.0

Parameters

Name Type Description
request array The default request body we will send to the Stripe API.
api string The Stripe API endpoint.

Source locations

File Arguments
includes/class-wc-stripe-api.php 2

wc_stripe_request_headers

Filters the request headers sent to the Stripe API.

Since: 9.7.0

Parameters

Name Type Description
headers array The default headers we send to the Stripe API.
user_agent array The user agent.

Source locations

File Arguments
includes/class-wc-stripe-api.php 1

wc_stripe_save_to_account_text

Filters the checkout text for saving payment information to the customer's account.

Parameters

Name Type Description
text string Save payment method checkbox label.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 1

wc_stripe_save_to_subs_checked

Filters whether the update-subscriptions checkbox is checked by default.

Parameters

Name Type Description
checked bool Whether the checkbox is checked by default.

Source locations

File Arguments
includes/compat/trait-wc-stripe-subscriptions.php 1

wc_stripe_save_to_subs_text

Filters the checkbox label for updating current subscriptions.

Parameters

Name Type Description
label string Checkbox label.

Source locations

File Arguments
includes/compat/trait-wc-stripe-subscriptions.php 1

wc_stripe_send_stripe_receipt

Filters whether to send Stripe receipt emails for payment requests.

Parameters

Name Type Description
send_receipt bool Whether to send a Stripe receipt email.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 1

wc_stripe_sepa_elements_options

Filters Stripe Elements options for SEPA fields.

Parameters

Name Type Description
options array Stripe Elements options.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 1

wc_stripe_sepa_mandate_notification

Filters the SEPA mandate notification channel.

Parameters

Name Type Description
notification_channel string Mandate notification channel.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 1

wc_stripe_settings

Filters the Stripe gateway settings fields.

Parameters

Name Type Description
settings array Stripe gateway settings fields.

Source locations

File Arguments
includes/admin/stripe-settings.php 1

wc_stripe_should_hide_express_checkout_button_based_on_tax_setup

Filters whether Express Checkout should be hidden based on the store tax setup.

Parameters

Name Type Description
hide bool Whether Express Checkout should be hidden.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 1

wc_stripe_show_express_checkout_on_change_payment_method

Filters whether Express Checkout buttons should appear on the WooCommerce Subscriptions "Change payment method" page.

Since: 10.8.0

Parameters

Name Type Description
should_show bool Whether the buttons should be shown.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 1

wc_stripe_show_payment_request_on_cart

Filters whether payment request buttons should be shown on the cart page.

Parameters

Name Type Description
show bool Whether to show payment request buttons.

Source locations

File Arguments
includes/class-wc-stripe.php 1

wc_stripe_show_payment_request_on_checkout

Filters whether payment request buttons should be shown on the checkout page.

Parameters

Name Type Description
show bool Whether to show payment request buttons.
post WP_Post|null Current post object, if available.

Source locations

File Arguments
includes/class-wc-stripe.php 2

wc_stripe_show_stripe_developer_widget

Filters whether the Stripe Developer Widget should be shown in the UI.

Only available in test mode.

Since: 10.7.0

Parameters

Name Type Description
show_stripe_developer_widget bool Whether the Stripe Developer Widget should be shown in the UI.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 1

wc_stripe_update_customer_args

Filters the arguments used to update a customer.

Since: 4.3.1

Parameters

Name Type Description
args array The arguments used to update a customer.

Source locations

File Arguments
includes/class-wc-stripe-customer.php 1

wc_stripe_update_existing_intent_request

Filter the value of the request.

Since: 6.1.0

Parameters

Name Type Description
request array Request to send to Stripe API.
order WC_Order Order that the intent is associated with.
source object Currently selected source.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway.php 3

wc_stripe_update_subs_payment_method_card_statuses

Filters the subscription statuses eligible for payment method updates from checkout.

Parameters

Name Type Description
statuses string[] Subscription statuses eligible for payment method updates.

Source locations

File Arguments
includes/compat/trait-wc-stripe-subscriptions.php 1

wc_stripe_upe_params

Filters the UPE classic checkout JavaScript parameters.

Parameters

Name Type Description
params array UPE JavaScript parameters.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 1

wc_stripe_upe_permitted_font_domains

Filters the list of permitted font domains for the Stripe Payment Element.

These host names will be used in the client Javascript to identify additional domains that return text/css resources which include @font-face declarations. Those stylesheets can then be passed into the Stripe payment element.

Since: 10.6.0

Parameters

Name Type Description
permitted_font_domains string[] List of permitted font domains.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-gateway.php 1

wc_stripe_use_default_customer_source

Filters whether retrying a renewal should fall back to the customer's default source.

Parameters

Name Type Description
use_default_source bool Whether to use the customer's default source.

Source locations

File Arguments
includes/compat/trait-wc-stripe-subscriptions.php 1

wc_stripe_webhook_dispute_change_order_status

Filters whether a dispute webhook should change the order status.

Parameters

Name Type Description
change_status bool Whether the webhook should change the order status.
order WC_Order Order associated with the dispute.
notification object Stripe webhook notification.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 3

wc_stripe_webhook_review_change_order_status

Filters whether a review webhook should change the order status.

Parameters

Name Type Description
change_status bool Whether the webhook should change the order status.
order WC_Order Order associated with the review.
notification object Stripe webhook notification.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 3

wc_stripe_{$payment_method_id}_supported_currencies

Filters the currencies supported by a voucher payment method.

The dynamic portion of the hook name is the Stripe payment method ID.

Parameters

Name Type Description
supported_currencies string[] Supported currency codes.

Source locations

File Arguments
includes/abstracts/abstract-wc-stripe-payment-gateway-voucher.php 1

wc_stripe_{$payment_method_id}_upe_supported_currencies

Filters the currencies supported by a UPE payment method.

The dynamic portion of the hook name is the Stripe payment method ID.

Parameters

Name Type Description
supported_currencies string[]|null Supported currency codes, or null for no currency restrictions.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-upe-payment-method.php 1

woocommerce_agentic_commerce_should_sync_product

Filter whether a product should be included in any Agentic Commerce sync.

Uses the WooCommerce core woocommerce_ prefix rather than wc_stripe_ so the same hook can be shared by other Agentic Commerce integrations that are not Stripe-specific. Applied per product at three entry points: the full-feed mapper, the inventory-change tracker, and the archive tracker. Returning false from any caller suppresses that product across all three surfaces. For large-scale exclusions, also hook wc_stripe_agentic_commerce_product_query_args to scope the full-feed query — that avoids loading the product at all and keeps the validator's skipped-product log unpolluted. Lifecycle contract: this filter only governs what gets sent to Stripe. A product that was previously exported and is now excluded stays in Stripe's catalog until the next full feed replacement overwrites it — the inventory tracker intentionally drops delta events for excluded products. Adapters that want immediate convergence when their filter outcome changes (e.g. a merchant flips a visibility setting) MUST fire do_action( 'wc_stripe_agentic_commerce_schedule_full_resync' ) to enqueue an immediate full-catalog sync.

Since: 10.9.0

Parameters

Name Type Description
should_sync bool Whether to include the product. Default true (false for subscriptions).
product WC_Product Product being evaluated.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-product-mapper.php 2

woocommerce_product_feed_args

Mirror the walker's filter so the preview selects the exact same set of products a real sync would. See ProductWalker::from_integration().

Since: 10.9.0

Parameters

Name Type Description
query_args array Arguments passed to wc_get_products().
integration WC_Stripe_Agentic_Commerce_Integration The integration the query belongs to.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-feed-preview.php 2

Deprecated Actions

wc_gateway_stripe_process_payment

Deprecated: Since 9.7.0

Replacement: wc_gateway_stripe_process_payment_charge - documentation

The wc_gateway_stripe_process_payment action is deprecated. Use wc_gateway_stripe_process_payment_charge instead.

Fires after a webhook charge is processed.

Deprecated in favor of wc_gateway_stripe_process_payment_charge.

Parameters

Name Type Description
charge object The charge object.
order WC_Order The order object.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 2

wc_gateway_stripe_process_redirect_payment

Deprecated: Since 9.7.0

Replacement: wc_gateway_stripe_process_payment_charge - documentation

The wc_gateway_stripe_process_redirect_payment action is deprecated. Use wc_gateway_stripe_process_payment_charge instead.

Fires after a redirect payment is processed.

Deprecated in favor of wc_gateway_stripe_process_payment_charge.

Parameters

Name Type Description
response object The response object.
order WC_Order The order object.

Source locations

File Arguments
includes/class-wc-stripe-order-handler.php 2

wc_gateway_stripe_process_webhook_payment

Deprecated: Since 9.7.0

Replacement: wc_gateway_stripe_process_payment_charge - documentation

The wc_gateway_stripe_process_webhook_payment action is deprecated. Use wc_gateway_stripe_process_payment_charge instead.

Fires after a webhook payment is processed.

Deprecated in favor of wc_gateway_stripe_process_payment_charge.

Parameters

Name Type Description
response object The response object.
order WC_Order The order object.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 2

Deprecated Filters

wc_connect_api_client_body

Deprecated: Since 9.6.0

The wc_connect_api_client_body filter is deprecated since WooCommerce Stripe Gateway 9.6.0, and will be removed in a future version.

Filters the body that will be sent to the WooCommerce Connect server.

Parameters

Name Type Description
body array The body that will be sent to the WooCommerce Connect server.

Source locations

File Arguments
includes/connect/class-wc-stripe-connect-api.php 1

wc_connect_request_args

Deprecated: Since 9.6.0

The wc_connect_request_args filter is deprecated since WooCommerce Stripe Gateway 9.6.0, and will be removed in a future version.

Filters the arguments for the WooCommerce Connect server request.

Parameters

Name Type Description
args array The arguments for the WooCommerce Connect server request.

Source locations

File Arguments
includes/connect/class-wc-stripe-connect-api.php 1

wc_connect_server_url

Deprecated: Since 9.6.0

The wc_connect_server_url filter is deprecated since WooCommerce Stripe Gateway 9.6.0, and will be removed in a future version.

Filters the URL for the WooCommerce Connect server.

Parameters

Name Type Description
url string The URL for the WooCommerce Connect server.

Source locations

File Arguments
includes/connect/class-wc-stripe-connect-api.php 1

wc_gateway_stripe_allowed_payment_processing_statuses

Deprecated: Since 9.7.0

Replacement: wc_stripe_allowed_payment_processing_statuses - documentation

The wc_gateway_stripe_allowed_payment_processing_statuses filter is deprecated since WooCommerce Stripe Gateway 9.7.0, and will be removed in a future version.

Filters the valid order statuses for payment processing.

Deprecated in favor of wc_stripe_allowed_payment_processing_statuses, which also includes the order object.

Parameters

Name Type Description
allowed_payment_processing_statuses array The allowed payment processing statuses.

Source locations

File Arguments
includes/class-wc-stripe-webhook-handler.php 1

wc_stripe_agentic_commerce_disable_checkout

Deprecated: Since 10.9.0

Replacement: woocommerce_agentic_commerce_disable_checkout - documentation

The wc_stripe_agentic_commerce_disable_checkout filter is deprecated since WooCommerce Stripe Gateway 10.9.0. Use woocommerce_agentic_commerce_disable_checkout instead.

This hook is deprecated.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-product-mapper.php 3

wc_stripe_agentic_commerce_should_sync_product

Deprecated: Since 10.9.0

Replacement: woocommerce_agentic_commerce_should_sync_product - documentation

The wc_stripe_agentic_commerce_should_sync_product filter is deprecated since WooCommerce Stripe Gateway 10.9.0. Use woocommerce_agentic_commerce_should_sync_product instead.

This hook is deprecated.

Source locations

File Arguments
includes/agentic-commerce/class-wc-stripe-agentic-commerce-product-mapper.php 2

wc_stripe_force_save_source

Deprecated: Since 9.6.0

Replacement: wc_stripe_force_save_payment_method - documentation

The wc_stripe_force_save_source filter is deprecated since WooCommerce Stripe Gateway 9.6.0. Use wc_stripe_force_save_payment_method instead.

This hook is deprecated.

Source locations

File Arguments
includes/class-wc-stripe-helper.php 2

wc_stripe_payment_request_add_to_cart_sold_individually_quantity

Deprecated: Since 10.6.0

Replacement: wc_stripe_express_checkout_add_to_cart_sold_individually_quantity - documentation

Filters the quantity for sold-individually products in Payment Request add-to-cart previews.

Deprecated in favor of wc_stripe_express_checkout_add_to_cart_sold_individually_quantity.

Parameters

Name Type Description
quantity int|float Quantity to add. Defaults to 1, not the requested quantity.
requested int|float Requested quantity.
product_id int Product ID.
variation_id int|null Variation ID, if any.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-ajax-handler.php 4

wc_stripe_payment_request_hide_itemization

Deprecated: Since 10.6.0

Replacement: wc_stripe_express_checkout_hide_itemization - documentation

Filters whether Express Checkout itemization should be hidden.

Deprecated in favor of wc_stripe_express_checkout_hide_itemization.

Parameters

Name Type Description
hide_itemization bool Whether itemization should be hidden.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 1

woocommerce_stripe_calculated_total

Deprecated: Since 9.6.0

Replacement: wc_stripe_calculated_total - documentation

The woocommerce_stripe_calculated_total filter is deprecated since WooCommerce Stripe Gateway 9.6.0, and will be removed in a future version. Use wc_stripe_calculated_total instead.

Filters the calculated total for the order.

Deprecated in favor of wc_stripe_calculated_total.

Parameters

Name Type Description
calculated_total float The calculated total.
order_total float The order total.
cart WC_Cart The cart object.

Source locations

File Arguments
includes/payment-methods/class-wc-stripe-express-checkout-helper.php 3

woocommerce_stripe_request_body

Deprecated: Since 9.7.0

Replacement: wc_stripe_request_body - documentation

The woocommerce_stripe_request_body filter is deprecated since WooCommerce Stripe Gateway 9.7.0, and will be removed in a future version. Use wc_stripe_request_body instead.

Filters the request body sent to the Stripe API. Deprecated in favor of wc_stripe_request_body.

Parameters

Name Type Description
request array The request body to send to the Stripe API.
api string The Stripe API endpoint.

Source locations

File Arguments
includes/class-wc-stripe-api.php 2

woocommerce_stripe_request_headers

Deprecated: Since 9.7.0

Replacement: wc_stripe_request_headers - documentation

The woocommerce_stripe_request_headers filter is deprecated since WooCommerce Stripe Gateway 9.7.0, and will be removed in a future version. Use wc_stripe_request_headers instead.

Filters the request headers sent to the Stripe API. Deprecated in favor of wc_stripe_request_headers.

Parameters

Name Type Description
headers array The headers to send to the Stripe API.

Source locations

File Arguments
includes/class-wc-stripe-api.php 1

⚠️ **GitHub.com Fallback** ⚠️