Developer Portal

WooCommerce Redsys Hooks 114 hooks

Actions and filters to customize every aspect of the Redsys payment flow in WooCommerce — no plugin fork required.

0 hooks shown

Payment lifecycle 13

redsys_post_payment_completeAction

Fires after the main Redsys (redirect / credit card) gateway has confirmed a successful payment and the order has been marked as paid. Use it to trigger fulfilment, sync external systems, or send custom notifications once payment is final. It is fired from many code paths (standard payment, tokenized payment, pre-authorization capture, subscriptions, etc.).

Parameters
NameTypeDescription
$order_idintThe WooCommerce order id ($order->get_id()).

Source: classes/class-wc-gateway-redsys.php:3699 (and many other locations in the same file).

PHP
add_action( 'redsys_post_payment_complete', 'my_redsys_payment_complete', 10, 1 );
function my_redsys_payment_complete( $order_id ) {
    $order = wc_get_order( $order_id );
    // Trigger your own fulfilment / CRM sync here.
    error_log( 'Redsys payment complete for order ' . $order_id );
}
redsys_post_payment_errorAction

Fires whenever the Redsys gateway aborts or rejects a payment (signature mismatch, declined transaction, blocked card, missing authorization, etc.). The second argument carries the error message or reason. Use it for alerting, logging to an external monitor, or custom recovery flows.

Parameters
NameTypeDescription
$order_idintThe WooCommerce order id.
$errorstringA human-readable error message or reason describing the failure.

Source: classes/class-wc-gateway-redsys.php:3357 (and many other locations across the gateway classes).

PHP
add_action( 'redsys_post_payment_error', 'my_redsys_payment_error', 10, 2 );
function my_redsys_payment_error( $order_id, $error ) {
    error_log( sprintf( 'Redsys error on order %d: %s', $order_id, $error ) );
}
redsys_post_authorizationAction

Fires after a pre-authorization (authorization-only hold) is confirmed for an order, before the funds are captured. Use it to react to held authorizations, for example to log the reserved amount or notify staff that a capture is pending.

Parameters
NameTypeDescription
$order_idintThe WooCommerce order id.
$amountmixedThe authorized amount.

Source: classes/class-wc-gateway-redsys.php:9076.

PHP
add_action( 'redsys_post_authorization', 'my_redsys_authorization', 10, 2 );
function my_redsys_authorization( $order_id, $amount ) {
    error_log( sprintf( 'Authorization held for order %d, amount %s', $order_id, $amount ) );
}
redsys_post_refundAction

Fires after a refund has been processed successfully through Redsys for an order. Use it to keep external accounting or ERP systems in sync with refunds issued from WooCommerce.

Parameters
NameTypeDescription
$order_idintThe WooCommerce order id.
$amountmixedThe refunded amount.
$reasonstringThe refund reason as entered in WooCommerce.

Source: classes/class-wc-gateway-redsys.php:9786.

PHP
add_action( 'redsys_post_refund', 'my_redsys_refund', 10, 3 );
function my_redsys_refund( $order_id, $amount, $reason ) {
    error_log( sprintf( 'Refunded %s on order %d (%s)', $amount, $order_id, $reason ) );
}
{gateway_id}_post_payment_completeAction

Per-gateway equivalent of redsys_post_payment_complete. Each non-redirect gateway fires its own action so you can hook only the payment method you care about. The hook name is built from the gateway id, for example bizum_post_payment_complete or insite_post_payment_complete.

Concrete hook names found in the source:

  • bizum_post_payment_complete (Bizum redirect and Bizum checkout)
  • directdeb_post_payment_complete (Direct Debit)
  • imap_post_payment_complete (IMAP bank reconciliation)
  • inespay_post_payment_complete (inespay)
  • insite_post_payment_complete (inSite)
  • masterpass_post_payment_complete (MasterPass)
  • paygold_post_payment_complete (Paygold)
  • redsysbanktransfer_post_payment_complete (Bank Transfer)
  • Built dynamically from $this->id in Apple Pay and Google Pay (checkout / redirection / blocks support), resolving to applepayredsys_post_payment_complete, googlepayredsys_post_payment_complete and googlepayredirecredsys_post_payment_complete.
Parameters
NameTypeDescription
$order_idintThe WooCommerce order id.

Source: classes/class-wc-gateway-bizum-redsys.php:1515 (and equivalent calls in each gateway class).

PHP
// React only to successful Bizum payments.
add_action( 'bizum_post_payment_complete', 'my_bizum_complete', 10, 1 );
function my_bizum_complete( $order_id ) {
    // Custom logic for Bizum-paid orders.
}
{gateway_id}_post_payment_errorAction

Per-gateway equivalent of redsys_post_payment_error. Each non-redirect gateway fires its own error action. The hook name is built from the gateway id, for example bizum_post_payment_error or insite_post_payment_error.

Concrete hook names found in the source:

  • bizum_post_payment_error
  • directdeb_post_payment_error
  • insite_post_payment_error
  • masterpass_post_payment_error
  • paygold_post_payment_error
  • Built dynamically from $this->id in Apple Pay and Google Pay, resolving to applepayredsys_post_payment_error, googlepayredsys_post_payment_error and googlepayredirecredsys_post_payment_error.
Parameters
NameTypeDescription
$order_idintThe WooCommerce order id.
$errorstringA human-readable error message or reason.

Source: classes/class-wc-gateway-bizum-redsys.php:1557 (and equivalent calls in each gateway class).

PHP
add_action( 'insite_post_payment_error', 'my_insite_error', 10, 2 );
function my_insite_error( $order_id, $error ) {
    error_log( sprintf( 'inSite error on order %d: %s', $order_id, $error ) );
}
redsys_payment_fieldsAction

Fires inside the main Redsys gateway's payment_fields() output, at the point where the checkout payment-method description and saved-card UI are rendered. Use it to print extra content (notices, custom inputs, trust badges) within the Redsys payment area at classic checkout.

Source: classes/class-wc-gateway-redsys.php:5591.

PHP
add_action( 'redsys_payment_fields', 'my_redsys_extra_fields' );
function my_redsys_extra_fields() {
    echo '<p class="redsys-notice">' . esc_html__( 'Secure payment by card.', 'my-textdomain' ) . '</p>';
}
redsys_allow_preauthFilter

Filters whether a given gateway should remain available when the cart contains a product flagged for pre-authorization. By default only gateways that declare supports( 'redsys_preauth' ) survive; return a truthy value to force-allow a specific gateway id. Note the value passed in as the first argument is the gateway id (string), and the callback's return value is evaluated as a boolean.

Parameters
NameTypeDescription
$gateway_idstringThe gateway id being evaluated. Return true to keep this gateway available for pre-auth carts, or false to leave the default behaviour.
$defaultboolThe default decision (false).

Source: classes/class-wc-gateway-redsys-global.php:4233.

PHP
add_filter( 'redsys_allow_preauth', 'my_allow_preauth', 10, 2 );
function my_allow_preauth( $gateway_id, $default ) {
    if ( 'bizumredsys' === $gateway_id ) {
        return true; // Allow Bizum on pre-auth carts.
    }
    return $default;
}
redsys_allow_token_rFilter

Filters whether a given gateway should remain available when the cart requires tokenization (recurring / saved card). By default only gateways that declare supports( 'redsys_token_r' ) survive; return a truthy value to force-allow a specific gateway id.

Parameters
NameTypeDescription
$gateway_idstringThe gateway id being evaluated. Return true to keep this gateway available for tokenization carts.
$defaultboolThe default decision (false).

Source: classes/class-wc-gateway-redsys-global.php:4255.

PHP
add_filter( 'redsys_allow_token_r', 'my_allow_token_r', 10, 2 );
function my_allow_token_r( $gateway_id, $default ) {
    return ( 'insite' === $gateway_id ) ? true : $default;
}
redsys_status_pendingFilter

Filters the order status used when a Redsys payment is left in a pending state (for example while awaiting confirmation). Return a different WooCommerce status slug to override the default pending status applied to such orders.

Parameters
NameTypeDescription
$statusstringThe pending status slug to be applied. Return the (possibly modified) status.

Source: classes/class-wc-gateway-redsys-global.php:2030.

PHP
add_filter( 'redsys_status_pending', 'my_pending_status', 10, 1 );
function my_pending_status( $status ) {
    return 'on-hold';
}
redsys_order_numberFilter

Filters the transaction / order number sent to Redsys for an order. Redsys requires a numeric order reference with strict formatting; use this filter if you need to customize how the reference is generated (for example to integrate with a sequential invoice numbering plugin).

Parameters
NameTypeDescription
$transaction_id2stringThe computed Redsys order number. Return the (possibly modified) order number.
$order_idintThe WooCommerce order id.
$gatewayobjectThe gateway instance generating the reference.

Source: classes/class-wc-gateway-redsys-global.php:2406.

PHP
add_filter( 'redsys_order_number', 'my_order_number', 10, 3 );
function my_order_number( $transaction_id2, $order_id, $gateway ) {
    // Keep Redsys formatting rules in mind (numeric, length limits).
    return $transaction_id2;
}
redsys_product_descriptionFilter

Filters the product description string (Ds_Merchant_ProductDescription) sent to Redsys for an order. Useful to customize what appears on the bank's terminal / cardholder statement.

Parameters
NameTypeDescription
$descriptionstringThe product description. Return the (possibly modified) description.
$orderWC_OrderThe order object.

Source: classes/class-wc-gateway-redsys-global.php:2483.

PHP
add_filter( 'redsys_product_description', 'my_product_description', 10, 2 );
function my_product_description( $description, $order ) {
    return 'My Store order #' . $order->get_order_number();
}
redsys_refund_filterFilter

Filters the array of arguments assembled before sending a refund request to Redsys. Use it to inspect or adjust the refund payload.

Parameters
NameTypeDescription
$arrayarrayThe refund request data. Return the (possibly modified) array.

Source: classes/class-wc-gateway-redsys.php:10524.

PHP
add_filter( 'redsys_refund_filter', 'my_refund_filter', 10, 1 );
function my_refund_filter( $array ) {
    // Inspect or tweak refund data before it is sent.
    return $array;
}

IPN / notifications 3

valid_{gateway_id}_standard_ipn_requestAction

Fires when a valid IPN (Instant Payment Notification, the asynchronous server-to-server callback from Redsys) has been received and verified for a gateway. The hook name is built dynamically from the gateway id, so it resolves to names such as valid_insite_standard_ipn_request, valid_bizumredsys_standard_ipn_request, valid_paygold_standard_ipn_request, valid_directdebitredsys_standard_ipn_request, valid_masterpass_standard_ipn_request, and the Apple Pay / Google Pay variants. The raw notification payload ($_POST) is passed so you can perform your own processing on every verified IPN.

Parameters
NameTypeDescription
$postarrayThe raw $_POST array received from Redsys for the verified notification.

Source: classes/class-wc-gateway-insite-redsys.php:9346 (and equivalent calls in each gateway class).

PHP
add_action( 'valid_insite_standard_ipn_request', 'my_insite_ipn', 10, 1 );
function my_insite_ipn( $post ) {
    // $post contains the verified Redsys notification fields.
    error_log( 'inSite IPN received: ' . wp_json_encode( $post ) );
}
valid-redsys-standard-ipn-requestAction

Fires when a valid IPN has been received and verified for the main Redsys (redirect / credit card) gateway. Note that this concrete hook name uses hyphens, unlike the underscore-based dynamic variants above.

Parameters
NameTypeDescription
$postarrayThe raw $_POST array received from Redsys.

Source: classes/class-wc-gateway-redsys.php:7888.

PHP
add_action( 'valid-redsys-standard-ipn-request', 'my_redsys_ipn', 10, 1 );
function my_redsys_ipn( $post ) {
    error_log( 'Redsys IPN received' );
}
valid_redsysbank_standard_ipn_requestAction

Fires when a valid IPN has been received and verified for the Redsys Bank Transfer gateway (redsysbank).

Parameters
NameTypeDescription
$postarrayThe raw $_POST array received from Redsys.

Source: classes/class-wc-gateway-redsys-bank-transfer.php:786.

PHP
add_action( 'valid_redsysbank_standard_ipn_request', 'my_bank_ipn', 10, 1 );
function my_bank_ipn( $post ) {
    // Custom handling for bank-transfer notifications.
}

Gateway icons and args 10

woocommerce_redsys_iconFilter

Filters the icon (logo) URL shown next to the main Redsys (credit card) gateway at checkout, including the WooCommerce Blocks checkout.

Parameters
NameTypeDescription
$logo_urlstringThe icon URL. Return the (possibly modified) URL.

Source: classes/class-wc-gateway-redsys.php:521 (and 1 other location, plus the blocks support class).

PHP
add_filter( 'woocommerce_redsys_icon', 'my_redsys_icon', 10, 1 );
function my_redsys_icon( $logo_url ) {
    return 'https://example.com/wp-content/uploads/my-card-logo.svg';
}
woocommerce_insite_iconFilter

Filters the icon (logo) URL shown for the inSite (embedded card form) gateway, in both classic and blocks checkout.

Parameters
NameTypeDescription
$logo_urlstringThe icon URL. Return the (possibly modified) URL.

Source: classes/class-wc-gateway-insite-redsys.php:413 (and other locations including the blocks support class).

PHP
add_filter( 'woocommerce_insite_icon', 'my_insite_icon', 10, 1 );
function my_insite_icon( $logo_url ) {
    return $logo_url; // or your own URL
}
woocommerce_masterpass_iconFilter

Filters the icon (logo) URL shown for the MasterPass gateway.

Parameters
NameTypeDescription
$logo_urlstringThe icon URL. Return the (possibly modified) URL.

Source: classes/class-wc-gateway-masterpass-redsys.php:231 (and other locations including the blocks support class).

PHP
add_filter( 'woocommerce_masterpass_icon', 'my_masterpass_icon', 10, 1 );
function my_masterpass_icon( $logo_url ) {
    return $logo_url;
}
woocommerce_paygold_iconFilter

Filters the icon (logo) URL shown for the Paygold gateway.

Parameters
NameTypeDescription
$logo_urlstringThe icon URL. Return the (possibly modified) URL.

Source: classes/class-wc-gateway-paygold-redsys.php:295 (and other locations including the blocks support class).

PHP
add_filter( 'woocommerce_paygold_icon', 'my_paygold_icon', 10, 1 );
function my_paygold_icon( $logo_url ) {
    return $logo_url;
}
woocommerce_bizumcheckout_iconFilter

Filters the icon (logo) URL shown for the Bizum checkout (inline) gateway in the WooCommerce Blocks checkout support layer.

Parameters
NameTypeDescription
$logo_urlstringThe icon URL. Return the (possibly modified) URL.

Source: includes/blocks/class-wc-gateway-bizumcheckout-support.php:243 (and 1 other location).

PHP
add_filter( 'woocommerce_bizumcheckout_icon', 'my_bizumcheckout_icon', 10, 1 );
function my_bizumcheckout_icon( $logo_url ) {
    return $logo_url;
}
woocommerce_bank_redsys_iconFilter

Filters the icon (logo) URL shown for the Redsys Bank Transfer gateway, in both classic and blocks checkout.

Parameters
NameTypeDescription
$logo_urlstringThe icon URL. Return the (possibly modified) URL.

Source: classes/class-wc-gateway-redsys-bank-transfer.php:262 (and other locations including the blocks support class).

PHP
add_filter( 'woocommerce_bank_redsys_icon', 'my_bank_icon', 10, 1 );
function my_bank_icon( $logo_url ) {
    return $logo_url;
}
woocommerce_{gateway_id}_iconFilter

Dynamic icon filter built from the gateway id. The plugin's gateway classes and blocks-support classes expose icon filters named after each gateway id, so concrete names include woocommerce_bizumredsys_icon, woocommerce_directdebitredsys_icon, woocommerce_inespayredsys_icon, woocommerce_applepayredsys_icon, woocommerce_googlepayredsys_icon, and woocommerce_googlepayredirecredsys_icon.

Parameters
NameTypeDescription
$logo_urlstringThe icon URL. Return the (possibly modified) URL.

Source: includes/blocks/class-wc-gateway-bizum-support.php:86 (and equivalent calls per gateway). In several gateway classes the dynamic icon is also fired via the woocommerce_{gateway_id}_iconn variant (see below).

PHP
add_filter( 'woocommerce_directdebitredsys_icon', 'my_directdebit_icon', 10, 1 );
function my_directdebit_icon( $logo_url ) {
    return $logo_url;
}
woocommerce_{gateway_id}_iconnFilter

Dynamic icon filter with a trailing double n, used inside several gateway classes (Bizum, Bizum checkout, Direct Debit, Apple Pay, Google Pay checkout/redirection). This is documented as-is because it exists in the source; it resolves to names such as woocommerce_directdebitredsys_iconn, woocommerce_applepayredsys_iconn, woocommerce_googlepayredsys_iconn, etc. Most front-end icon rendering also exposes the correctly-spelled woocommerce_{gateway_id}_icon via the blocks support classes, so prefer that one where available.

Parameters
NameTypeDescription
$logo_urlstringThe icon URL. Return the (possibly modified) URL.

Source: classes/class-wc-gateway-direct-debit-redsys.php:255 (and equivalent calls per gateway).

PHP
add_filter( 'woocommerce_applepayredsys_iconn', 'my_applepay_iconn', 10, 1 );
function my_applepay_iconn( $logo_url ) {
    return $logo_url;
}
woocommerce_redsys_argsFilter

Filters the full array of arguments (the Redsys request parameters) assembled before a payment is sent to the bank, for the gateways that use the shared redsys argument set (the main gateway, Bizum, Bizum checkout, Bank Transfer, and Direct Debit). Use it to add or override Redsys merchant parameters (Ds_Merchant_*).

Parameters
NameTypeDescription
$redsys_argsarrayThe Redsys request arguments. Return the (possibly modified) array.

Source: classes/class-wc-gateway-bizum-redsys.php:990 (and other locations including the main gateway, Bank Transfer, and Direct Debit classes).

PHP
add_filter( 'woocommerce_redsys_args', 'my_redsys_args', 10, 1 );
function my_redsys_args( $redsys_args ) {
    // Add or modify Ds_Merchant_* parameters.
    return $redsys_args;
}
woocommerce_{gateway_id}_argsFilter

Dynamic version of the request-args filter, built from the gateway id for gateways that maintain their own argument set (MasterPass, Apple Pay checkout, Google Pay checkout, Google Pay redirection). Concrete names include woocommerce_masterpass_args, woocommerce_applepayredsys_args, woocommerce_googlepayredsys_args, and woocommerce_googlepayredirecredsys_args.

Parameters
NameTypeDescription
$redsys_argsarrayThe Redsys request arguments. Return the (possibly modified) array.

Source: classes/class-wc-gateway-apple-pay-checkout.php:1533 (and equivalent calls per gateway).

PHP
add_filter( 'woocommerce_googlepayredsys_args', 'my_googlepay_args', 10, 1 );
function my_googlepay_args( $redsys_args ) {
    return $redsys_args;
}

Tokenization and My Account 8

text_add_card_my_accountFilter

Filters the label text of the "Add card" action presented to customers in the My Account area when they can store a new card token.

Parameters
NameTypeDescription
$textstringThe button/label text. Return the (possibly modified) text.

Source: classes/class-wc-gateway-redsys.php:5612.

PHP
add_filter( 'text_add_card_my_account', 'my_add_card_text', 10, 1 );
function my_add_card_text( $text ) {
    return __( 'Save a new card', 'my-textdomain' );
}
redsys_text_get_tokenFilter

Filters the text shown to the customer offering to save / tokenize their card during checkout (the "store this card" wording). Applied across the main, inSite and blocks-support contexts.

Parameters
NameTypeDescription
$textstringThe tokenization prompt text. Return the (possibly modified) text.

Source: classes/class-wc-gateway-redsys.php:5586 (and other locations including inSite and blocks support classes).

PHP
add_filter( 'redsys_text_get_token', 'my_get_token_text', 10, 1 );
function my_get_token_text( $text ) {
    return __( 'Remember my card for next time', 'my-textdomain' );
}
redsys_text_preauthFilter

Filters the text shown to the customer explaining a pre-authorization (authorization-only) charge at checkout.

Parameters
NameTypeDescription
$textstringThe pre-authorization explanatory text. Return the (possibly modified) text.

Source: classes/class-wc-gateway-redsys.php:5596 (and other locations including inSite and blocks support classes).

PHP
add_filter( 'redsys_text_preauth', 'my_preauth_text', 10, 1 );
function my_preauth_text( $text ) {
    return __( 'Your card will be authorized, not charged, until we ship.', 'my-textdomain' );
}
redsys_disable_remote_token_removalFilter

Since: 23.0.0

Filters whether the plugin should skip removing a stored card token on the Redsys side when an unexpected token-removal notification arrives. It defaults to true (remote removal disabled) as a safety guard while unexpected removals are investigated. Return false to allow the remote token to be deleted.

Parameters
NameTypeDescription
$disabledboolWhether remote removal is disabled. Return true to keep the token, false to allow remote deletion.
$dataarrayThe token payload received from Redsys.

Source: classes/class-wc-gateway-redsys-global.php:3570.

PHP
add_filter( 'redsys_disable_remote_token_removal', 'my_token_removal', 10, 2 );
function my_token_removal( $disabled, $data ) {
    return false; // Allow remote token deletion.
}
redsys_mail_add_tokenFilter

Filters the data used to build the e-mail that invites a customer to add / register a card token (subject, body, headers, recipient, etc.). Use it to customize the wording or routing of the token-request e-mail.

Parameters
NameTypeDescription
$dataarrayAssociative array with keys such as user_id, email, name, last_name, site_title, user_link, subject, body, headers. Return the (possibly modified) array.

Source: classes/class-wc-redsys-profile.php:125 (and 1 other location in the same file).

PHP
add_filter( 'redsys_mail_add_token', 'my_add_token_mail', 10, 1 );
function my_add_token_mail( $data ) {
    $data['subject'] = __( 'Please register your payment card', 'my-textdomain' );
    return $data;
}
save_field_update_order_metaAction

Fires after the gateway processes the saving of custom order fields, passing the submitted data. Use it to persist your own order meta based on the posted values during checkout / order processing.

Parameters
NameTypeDescription
$dataarrayThe submitted data ($_POST or a derived data array, depending on call site).

Source: classes/class-wc-gateway-redsys.php:10954 (and 3 other locations across the main and inSite gateway classes).

PHP
add_action( 'save_field_update_order_meta', 'my_save_order_fields', 10, 1 );
function my_save_order_fields( $data ) {
    // Inspect $data and store your own order meta if needed.
}
redsys_kses_descripcionFilter

Filters the list of allowed HTML tags/attributes used to sanitize the gateway description rendered at checkout (passed to wp_kses). Use it to allow additional safe markup in the payment-method description.

Parameters
NameTypeDescription
$allowed_htmlarrayThe wp_kses allowed-HTML array. Return the (possibly modified) array.

Source: classes/class-wc-gateway-redsys.php:5516 (and other locations across the inSite, Bizum checkout, Apple Pay and Google Pay classes).

PHP
add_filter( 'redsys_kses_descripcion', 'my_kses_descripcion', 10, 1 );
function my_kses_descripcion( $allowed_html ) {
    $allowed_html['span'] = array( 'class' => array() );
    return $allowed_html;
}
bizum_text_waiting_authFilter

Filters the message shown to the customer while a Bizum (checkout) payment is waiting to be confirmed in the buyer's bank mobile app.

Parameters
NameTypeDescription
$textstringThe waiting message. Return the (possibly modified) text.

Source: classes/class-wc-gateway-bizum-checkout-redsys.php:1824.

PHP
add_filter( 'bizum_text_waiting_auth', 'my_bizum_waiting', 10, 1 );
function my_bizum_waiting( $text ) {
    return __( 'Please approve the charge in your banking app.', 'my-textdomain' );
}

Account-creation toggles 4

wc_gateway_apple_pay_redsys_allow_account_creationFilter

Filters whether a WordPress/WooCommerce account may be created automatically during an Apple Pay (classic checkout) purchase. Defaults to WooCommerce's registration setting; return true/false to override.

Parameters
NameTypeDescription
$registration_enabledboolWhether account creation is allowed. Return the (possibly modified) boolean.

Source: classes/class-wc-gateway-apple-pay-checkout.php:1963 (and 1 other location in the same file).

PHP
add_filter( 'wc_gateway_apple_pay_redsys_allow_account_creation', '__return_true' );
wc_gateway_apple_pay_redsys_blocks_allow_account_creationFilter

Same as above but for the Apple Pay gateway in the WooCommerce Blocks checkout.

Parameters
NameTypeDescription
$registration_enabledboolWhether account creation is allowed. Return the (possibly modified) boolean.

Source: includes/blocks/class-wc-gateway-apple-pay-redsys-support.php:298.

PHP
add_filter( 'wc_gateway_apple_pay_redsys_blocks_allow_account_creation', '__return_false' );
wc_gateway_googlepay_redsys_allow_account_creationFilter

Filters whether an account may be created automatically during a Google Pay (classic checkout) purchase.

Parameters
NameTypeDescription
$registration_enabledboolWhether account creation is allowed. Return the (possibly modified) boolean.

Source: classes/class-wc-gateway-googlepay-checkout.php:2101.

PHP
add_filter( 'wc_gateway_googlepay_redsys_allow_account_creation', '__return_true' );
wc_gateway_googlepay_redsys_blocks_allow_account_creationFilter

Same as above but for the Google Pay gateway in the WooCommerce Blocks checkout.

Parameters
NameTypeDescription
$registration_enabledboolWhether account creation is allowed. Return the (possibly modified) boolean.

Source: includes/blocks/class-wc-gateway-googlepay-redsys-support.php:307.

PHP
add_filter( 'wc_gateway_googlepay_redsys_blocks_allow_account_creation', '__return_false' );

Scheduled e-mails 2

redsys_send_expired_credit_card_emailFilter

Filters the data passed to the scheduled "expiring credit card" reminder e-mail before it is sent. Use it to customize or suppress the reminder.

Parameters
NameTypeDescription
$dataarrayThe e-mail data. Return the (possibly modified) array.

Source: classes/class-wc-gateway-redsys-scheduled-actions.php:257.

PHP
add_filter( 'redsys_send_expired_credit_card_email', 'my_expiring_email', 10, 1 );
function my_expiring_email( $data ) {
    return $data;
}
redsys_send_deleted_credit_card_emailFilter

Filters the message body of the "deleted credit card" notification e-mail before it is sent to the user.

Parameters
NameTypeDescription
$messagestringThe e-mail message body. Return the (possibly modified) message.
$user_idintThe id of the user whose card was deleted.

Source: classes/class-wc-gateway-redsys-scheduled-actions.php:341.

PHP
add_filter( 'redsys_send_deleted_credit_card_email', 'my_deleted_email', 10, 2 );
function my_deleted_email( $message, $user_id ) {
    return $message;
}

Product / Buy-now button 3

redsys_before_buy_now_button_productAction

Fires just before the "Buy now" (one-click) button is rendered on a single product page. Use it to output custom markup above the button.

Source: loader/one-clic-button.php:228.

PHP
add_action( 'redsys_before_buy_now_button_product', 'my_before_buy_now' );
function my_before_buy_now() {
    echo '<div class="my-buy-now-notice">' . esc_html__( 'Fast checkout:', 'my-textdomain' ) . '</div>';
}
redsys_after_buy_now_button_productAction

Fires just after the "Buy now" (one-click) button is rendered on a single product page. Use it to output custom markup below the button.

Source: loader/one-clic-button.php:246.

PHP
add_action( 'redsys_after_buy_now_button_product', 'my_after_buy_now' );
function my_after_buy_now() {
    echo '<p class="my-buy-now-help">' . esc_html__( 'Secure one-click payment.', 'my-textdomain' ) . '</p>';
}
redsys_accepted_shipping_methodsFilter

Filters the list of shipping methods accepted by the one-click "Buy now" flow. Defaults to the stored woocommerce_redsys_shipping_methods option.

Parameters
NameTypeDescription
$shipping_methodsarrayThe accepted shipping method ids. Return the (possibly modified) array.

Source: loader/one-clic-button.php:89.

PHP
add_filter( 'redsys_accepted_shipping_methods', 'my_buy_now_shipping', 10, 1 );
function my_buy_now_shipping( $shipping_methods ) {
    $shipping_methods[] = 'flat_rate:3';
    return $shipping_methods;
}

Express checkout 3

redsys_express_custom_fieldsFilter

Filters the list of custom checkout fields collected during the express (Apple Pay / Google Pay style) checkout flow, for a given context.

Parameters
NameTypeDescription
$custom_fieldsarrayThe custom fields definition. Return the (possibly modified) array.
$contextmixedThe context in which the fields are requested.

Source: includes/class-redsys-express-custom-fields.php:214.

PHP
add_filter( 'redsys_express_custom_fields', 'my_express_fields', 10, 2 );
function my_express_fields( $custom_fields, $context ) {
    return $custom_fields;
}
redsys_express_custom_fields_mergedFilter

Filters the final merged set of express-checkout custom fields after all sources have been combined.

Parameters
NameTypeDescription
$mergedarrayThe merged custom fields. Return the (possibly modified) array.

Source: includes/class-redsys-express-custom-fields.php:524.

PHP
add_filter( 'redsys_express_custom_fields_merged', 'my_express_fields_merged', 10, 1 );
function my_express_fields_merged( $merged ) {
    return $merged;
}
redsys_express_render_inline_fieldsFilter

Filters whether the express-checkout custom fields should be rendered inline. Defaults to false; return true to render them inline.

Parameters
NameTypeDescription
$render_inlineboolWhether to render fields inline. Return the (possibly modified) boolean.

Source: includes/class-redsys-express-custom-fields.php:581.

PHP
add_filter( 'redsys_express_render_inline_fields', '__return_true' );

A2A 14

redsys_a2a_agent_card_publicFilter

Filters the public A2A agent card document before it is returned to unauthenticated callers.

Parameters
NameTypeDescription
$cardarrayThe public agent card. Return the (possibly modified) array.

Source: classes/a2a/class-redsys-a2a-agent-card.php:67.

PHP
add_filter( 'redsys_a2a_agent_card_public', 'my_a2a_public_card', 10, 1 );
function my_a2a_public_card( $card ) {
    return $card;
}
redsys_a2a_agent_card_extendedFilter

Filters the extended (authenticated) A2A agent card document.

Parameters
NameTypeDescription
$cardarrayThe extended agent card. Return the (possibly modified) array.

Source: classes/a2a/class-redsys-a2a-agent-card.php:84.

PHP
add_filter( 'redsys_a2a_agent_card_extended', 'my_a2a_extended_card', 10, 1 );
function my_a2a_extended_card( $card ) {
    return $card;
}
redsys_a2a_agent_card_skillsFilter

Filters the list of skills advertised in the A2A agent card. Defaults to an empty array; add your own skill definitions.

Parameters
NameTypeDescription
$skillsarrayThe skills list. Return the (possibly modified) array.

Source: classes/a2a/class-redsys-a2a-agent-card.php:152.

PHP
add_filter( 'redsys_a2a_agent_card_skills', 'my_a2a_skills', 10, 1 );
function my_a2a_skills( $skills ) {
    return $skills;
}
redsys_a2a_agent_card_security_schemesFilter

Filters the security schemes declared in the A2A agent card.

Parameters
NameTypeDescription
$schemesarrayThe security schemes. Return the (possibly modified) array.

Source: classes/a2a/class-redsys-a2a-agent-card.php:199.

PHP
add_filter( 'redsys_a2a_agent_card_security_schemes', 'my_a2a_schemes', 10, 1 );
function my_a2a_schemes( $schemes ) {
    return $schemes;
}
redsys_a2a_agent_card_scopesFilter

Filters the default OAuth scopes declared in the A2A agent card.

Parameters
NameTypeDescription
$defaultsarrayThe default scopes. Return the (possibly modified) array.

Source: classes/a2a/class-redsys-a2a-agent-card.php:224.

PHP
add_filter( 'redsys_a2a_agent_card_scopes', 'my_a2a_scopes', 10, 1 );
function my_a2a_scopes( $defaults ) {
    return $defaults;
}
redsys_a2a_agent_card_nameFilter

Filters the agent name shown in the A2A agent card.

Parameters
NameTypeDescription
$namestringThe agent name. Return the (possibly modified) string.

Source: classes/a2a/class-redsys-a2a-agent-card.php:287.

PHP
add_filter( 'redsys_a2a_agent_card_name', function ( $name ) {
    return 'My Store Agent';
} );
redsys_a2a_agent_card_descriptionFilter

Filters the agent description shown in the A2A agent card.

Parameters
NameTypeDescription
$descstringThe agent description. Return the (possibly modified) string.

Source: classes/a2a/class-redsys-a2a-agent-card.php:302.

PHP
add_filter( 'redsys_a2a_agent_card_description', function ( $desc ) {
    return 'Payments agent for My Store.';
} );
redsys_a2a_agent_card_permissionFilter

Filters whether the current request is permitted to access the A2A agent card. Defaults to true; return false to deny access.

Parameters
NameTypeDescription
$permittedboolWhether access is allowed. Return the (possibly modified) boolean.
$requestWP_REST_RequestThe incoming REST request.

Source: classes/a2a/class-redsys-a2a-rest-controller.php:223.

PHP
add_filter( 'redsys_a2a_agent_card_permission', 'my_a2a_permission', 10, 2 );
function my_a2a_permission( $permitted, $request ) {
    return $permitted;
}
redsys_a2a_rate_limitsFilter

Filters the rate-limit configuration applied to an A2A client.

Parameters
NameTypeDescription
$defaultsarrayThe default rate-limit configuration. Return the (possibly modified) array.
$clientmixedThe client the limits apply to.

Source: classes/a2a/class-redsys-a2a-auth.php:481.

PHP
add_filter( 'redsys_a2a_rate_limits', 'my_a2a_rate_limits', 10, 2 );
function my_a2a_rate_limits( $defaults, $client ) {
    return $defaults;
}
redsys_a2a_gateway_id_for_modeFilter

Filters which gateway id the A2A bridge uses for a given payment mode.

Parameters
NameTypeDescription
$idstringThe gateway id. Return the (possibly modified) id.
$modestringThe payment mode being resolved.

Source: classes/a2a/class-redsys-a2a-redsys-bridge.php:56.

PHP
add_filter( 'redsys_a2a_gateway_id_for_mode', 'my_a2a_gateway_for_mode', 10, 2 );
function my_a2a_gateway_for_mode( $id, $mode ) {
    return $id;
}
redsys_a2a_enabled_modesFilter

Filters the list of enabled A2A payment modes.

Parameters
NameTypeDescription
$modesarrayThe enabled modes. Return the (possibly modified) array.

Source: classes/a2a/class-redsys-a2a-redsys-bridge.php:95.

PHP
add_filter( 'redsys_a2a_enabled_modes', 'my_a2a_modes', 10, 1 );
function my_a2a_modes( $modes ) {
    return $modes;
}
redsys_a2a_limits_configFilter

Filters the A2A spending/limits configuration array.

Parameters
NameTypeDescription
$configarrayThe limits configuration. Return the (possibly modified) array.

Source: classes/a2a/class-redsys-a2a-limits.php:99.

PHP
add_filter( 'redsys_a2a_limits_config', 'my_a2a_limits', 10, 1 );
function my_a2a_limits( $config ) {
    return $config;
}
redsys_a2a_task_advancedAction

Fires when an A2A task transitions to a new state via the webhook glue layer.

Parameters
NameTypeDescription
$task_idstringThe A2A task id.
$target_statestringThe state the task advanced to.
$eventmixedThe event payload that caused the transition.

Source: classes/a2a/class-redsys-a2a-webhook-glue.php:98.

PHP
add_action( 'redsys_a2a_task_advanced', 'my_a2a_task_advanced', 10, 3 );
function my_a2a_task_advanced( $task_id, $target_state, $event ) {
    // React to task state changes.
}
redsys_a2a_task_refundedAction

Fires when an A2A task is refunded.

Parameters
NameTypeDescription
$task_idstringThe A2A task id.
$order_idintThe related WooCommerce order id.
$amountmixedThe refunded amount.

Source: classes/a2a/class-redsys-a2a-webhook-glue.php:183.

PHP
add_action( 'redsys_a2a_task_refunded', 'my_a2a_task_refunded', 10, 3 );
function my_a2a_task_refunded( $task_id, $order_id, $amount ) {
    // Sync refund to your system.
}

UCP 25

redsys_ucp_session_createdAction

Fires when a new UCP checkout session is created for an order.

Parameters
NameTypeDescription
$session_idstringThe UCP session id.
$orderWC_OrderThe created order.
$statearrayThe session state.
$client_idstringThe OAuth client id that created the session.

Source: classes/ucp/class-redsys-ucp-capability-checkout.php:268.

PHP
add_action( 'redsys_ucp_session_created', 'my_ucp_session_created', 10, 4 );
function my_ucp_session_created( $session_id, $order, $state, $client_id ) {
    // React to new UCP sessions.
}
redsys_ucp_session_updatedAction

Fires when an existing UCP session is updated.

Parameters
NameTypeDescription
$session_idstringThe UCP session id.
$orderWC_OrderThe order.
$statearrayThe updated session state.
$client_idstringThe OAuth client id.

Source: classes/ucp/class-redsys-ucp-capability-checkout.php:397.

PHP
add_action( 'redsys_ucp_session_updated', 'my_ucp_session_updated', 10, 4 );
function my_ucp_session_updated( $session_id, $order, $state, $client_id ) {}
redsys_ucp_session_status_changedAction

Fires when a UCP session's status changes (for example to refunded or canceled). Used to keep UCP session status in sync with the WooCommerce order.

Parameters
NameTypeDescription
$session_idstringThe UCP session id.
$ucp_statusstringThe new UCP status (for example refunded, canceled).
$orderWC_Order|nullThe related order, or null if not available.
$old_statusstringThe previous status (the order's previous WooCommerce status, when available).

Source: classes/ucp/class-redsys-ucp-order-sync.php:53 (and 3 other locations in the UCP layer).

PHP
add_action( 'redsys_ucp_session_status_changed', 'my_ucp_status_changed', 10, 4 );
function my_ucp_status_changed( $session_id, $ucp_status, $order, $old_status ) {}
redsys_ucp_complete_handoffAction

Fires when a UCP session completes its handoff (the buyer is handed off to complete payment) for an order.

Parameters
NameTypeDescription
$session_idstringThe UCP session id.
$orderWC_OrderThe order.
$payloadarrayThe handoff payload (an array; empty array if none).

Source: classes/ucp/class-redsys-ucp-capability-checkout.php:515.

PHP
add_action( 'redsys_ucp_complete_handoff', 'my_ucp_handoff', 10, 3 );
function my_ucp_handoff( $session_id, $order, $payload ) {}
redsys_ucp_cart_createdAction

Fires when a new UCP cart is created.

Parameters
NameTypeDescription
$cart_idstringThe UCP cart id.
$statearrayThe cart state.

Source: classes/ucp/class-redsys-ucp-capability-cart.php:110.

PHP
add_action( 'redsys_ucp_cart_created', 'my_ucp_cart_created', 10, 2 );
function my_ucp_cart_created( $cart_id, $state ) {}
redsys_ucp_cart_updatedAction

Fires when a UCP cart is updated.

Parameters
NameTypeDescription
$cart_idstringThe UCP cart id.
$updatedarrayThe updated cart state.

Source: classes/ucp/class-redsys-ucp-capability-cart.php:167.

PHP
add_action( 'redsys_ucp_cart_updated', 'my_ucp_cart_updated', 10, 2 );
function my_ucp_cart_updated( $cart_id, $updated ) {}
redsys_ucp_cart_expiredAction

Fires when the UCP cron cleanup determines a cart has expired.

Parameters
NameTypeDescription
$cart_idstringThe UCP cart id.
$cart_rowobject|arrayThe stored cart record.

Source: classes/ucp/class-redsys-ucp-cron.php:69.

PHP
add_action( 'redsys_ucp_cart_expired', 'my_ucp_cart_expired', 10, 2 );
function my_ucp_cart_expired( $cart_id, $cart_row ) {}
redsys_ucp_cart_ttl_minutesFilter

Filters the time-to-live, in minutes, for a UCP cart.

Parameters
NameTypeDescription
$ttlintThe TTL in minutes. Return the (possibly modified) value.
$cart_idstringThe UCP cart id.

Source: classes/ucp/class-redsys-ucp-capability-cart.php:99.

PHP
add_filter( 'redsys_ucp_cart_ttl_minutes', 'my_ucp_cart_ttl', 10, 2 );
function my_ucp_cart_ttl( $ttl, $cart_id ) {
    return 120;
}
redsys_ucp_session_ttl_minutesFilter

Filters the time-to-live, in minutes, for a UCP session. Defaults to 60.

Parameters
NameTypeDescription
$ttlintThe TTL in minutes. Return the (possibly modified) value.
$session_idstringThe UCP session id.
$orderWC_OrderThe related order.

Source: classes/ucp/class-redsys-ucp-capability-checkout.php:250.

PHP
add_filter( 'redsys_ucp_session_ttl_minutes', 'my_ucp_session_ttl', 10, 3 );
function my_ucp_session_ttl( $ttl, $session_id, $order ) {
    return 90;
}
redsys_ucp_skip_handoff_signature_checkFilter

Filters whether the handoff signature verification should be skipped for a UCP session. Defaults to false (signature is verified). Return true to skip it (not recommended in production).

Parameters
NameTypeDescription
$skipboolWhether to skip the check. Return the (possibly modified) boolean.
$session_idstringThe UCP session id.

Source: classes/ucp/class-redsys-ucp-manager.php:287.

PHP
add_filter( 'redsys_ucp_skip_handoff_signature_check', '__return_false', 10, 2 );
redsys_ucp_handoff_ttlFilter

Filters the time-to-live for a UCP handoff token.

Parameters
NameTypeDescription
$ttlintThe handoff TTL (in seconds). Return the (possibly modified) value.

Source: classes/ucp/class-redsys-ucp-manager.php:298.

PHP
add_filter( 'redsys_ucp_handoff_ttl', function ( $ttl ) {
    return $ttl;
} );
redsys_ucp_mcp_toolsFilter

Filters the list of tools exposed by the UCP MCP (Model Context Protocol) server.

Parameters
NameTypeDescription
$toolsarrayThe MCP tools list. Return the (possibly modified) array.

Source: classes/ucp/class-redsys-ucp-mcp-server.php:276.

PHP
add_filter( 'redsys_ucp_mcp_tools', 'my_ucp_mcp_tools', 10, 1 );
function my_ucp_mcp_tools( $tools ) {
    return $tools;
}
redsys_ucp_languagesFilter

Filters the list of supported languages advertised by the UCP discovery layer.

Parameters
NameTypeDescription
$languagesarrayThe languages list. Return the (possibly modified) array.

Source: classes/ucp/class-redsys-ucp-discovery.php:396.

PHP
add_filter( 'redsys_ucp_languages', 'my_ucp_languages', 10, 1 );
function my_ucp_languages( $languages ) {
    return $languages;
}
redsys_ucp_embedded_endpointFilter

Filters the default embedded endpoint URL advertised by UCP discovery.

Parameters
NameTypeDescription
$endpointstringThe embedded endpoint URL. Return the (possibly modified) URL.

Source: classes/ucp/class-redsys-ucp-discovery.php:433.

PHP
add_filter( 'redsys_ucp_embedded_endpoint', function ( $endpoint ) {
    return $endpoint;
} );
redsys_ucp_well_known_documentFilter

Filters the UCP .well-known discovery document before it is served.

Parameters
NameTypeDescription
$docarrayThe well-known document. Return the (possibly modified) array.

Source: classes/ucp/class-redsys-ucp-discovery.php:608.

PHP
add_filter( 'redsys_ucp_well_known_document', 'my_ucp_well_known', 10, 1 );
function my_ucp_well_known( $doc ) {
    return $doc;
}
redsys_ucp_response_envelopeFilter

Filters the response envelope wrapping a UCP API operation result.

Parameters
NameTypeDescription
$envelopearrayThe response envelope. Return the (possibly modified) array.
$operation_typestringThe operation type that produced the response.
$requestWP_REST_RequestThe originating request.

Source: classes/shared/class-redsys-ucp-response-envelope.php:113.

PHP
add_filter( 'redsys_ucp_response_envelope', 'my_ucp_envelope', 10, 3 );
function my_ucp_envelope( $envelope, $operation_type, $request ) {
    return $envelope;
}
redsys_ucp_buyer_consents_requiredFilter

Filters whether buyer consents are required in a UCP flow.

Parameters
NameTypeDescription
$defaultmixedThe default consent requirement. Return the (possibly modified) value.

Source: classes/ucp/extensions/class-redsys-ucp-extension-buyer-consent.php:61.

PHP
add_filter( 'redsys_ucp_buyer_consents_required', function ( $default ) {
    return $default;
} );
redsys_ucp_identity_user_authenticated_scopesFilter

Filters the list of scopes considered granted for an authenticated UCP user identity.

Parameters
NameTypeDescription
$outarrayThe authenticated scopes. Return the (possibly modified) array.

Source: classes/ucp/class-redsys-ucp-capability-identity.php:274.

PHP
add_filter( 'redsys_ucp_identity_user_authenticated_scopes', 'my_ucp_scopes', 10, 1 );
function my_ucp_scopes( $out ) {
    return $out;
}
redsys_ucp_platform_profile_ttlFilter

Filters the cache TTL for a fetched UCP platform profile.

Parameters
NameTypeDescription
$ttlintThe cache TTL (in seconds). Return the (possibly modified) value.
$urlstringThe platform profile URL.
$decodedarrayThe decoded profile data.

Source: classes/ucp/class-redsys-ucp-platform-profile-resolver.php:224.

PHP
add_filter( 'redsys_ucp_platform_profile_ttl', 'my_ucp_profile_ttl', 10, 3 );
function my_ucp_profile_ttl( $ttl, $url, $decoded ) {
    return $ttl;
}
redsys_ucp_webhook_supported_eventsFilter

Filters the list of webhook event types supported by the UCP webhook dispatcher.

Parameters
NameTypeDescription
$defaultsarrayThe supported events. Return the (possibly modified) array.

Source: classes/ucp/class-redsys-ucp-webhook-dispatcher.php:42.

PHP
add_filter( 'redsys_ucp_webhook_supported_events', 'my_ucp_events', 10, 1 );
function my_ucp_events( $defaults ) {
    return $defaults;
}
redsys_ucp_webhook_batch_sizeFilter

Filters the batch size used when dispatching UCP webhooks. Defaults to 25.

Parameters
NameTypeDescription
$batch_sizeintThe batch size. Return the (possibly modified) value.

Source: classes/ucp/class-redsys-ucp-webhook-dispatcher.php:138.

PHP
add_filter( 'redsys_ucp_webhook_batch_size', function ( $size ) {
    return 50;
} );
redsys_ucp_webhook_timeoutFilter

Filters the HTTP request timeout, in seconds, for a UCP webhook delivery. Defaults to 10.

Parameters
NameTypeDescription
$timeoutintThe timeout in seconds. Return the (possibly modified) value.
$webhookmixedThe webhook being delivered.

Source: classes/ucp/class-redsys-ucp-webhook-dispatcher.php:182 (and 1 other location in the same file).

PHP
add_filter( 'redsys_ucp_webhook_timeout', 'my_ucp_webhook_timeout', 10, 2 );
function my_ucp_webhook_timeout( $timeout, $webhook ) {
    return 20;
}
redsys_ucp_webhook_event_payloadFilter

Filters the payload sent for a UCP webhook event.

Parameters
NameTypeDescription
$dataarrayThe event payload. Return the (possibly modified) array.
$event_typestringThe event type.
$session_idstringThe related UCP session id.

Source: classes/ucp/class-redsys-ucp-webhook-dispatcher.php:249.

PHP
add_filter( 'redsys_ucp_webhook_event_payload', 'my_ucp_payload', 10, 3 );
function my_ucp_payload( $data, $event_type, $session_id ) {
    return $data;
}
redsys_ucp_webhook_skipFilter

Filters whether a UCP webhook delivery should be skipped for a given event. Defaults to false; return true to skip.

Parameters
NameTypeDescription
$skipboolWhether to skip. Return the (possibly modified) boolean.
$event_typestringThe event type.
$webhookmixedThe webhook subscription.

Source: classes/ucp/class-redsys-ucp-webhook-dispatcher.php:260.

PHP
add_filter( 'redsys_ucp_webhook_skip', 'my_ucp_webhook_skip', 10, 3 );
function my_ucp_webhook_skip( $skip, $event_type, $webhook ) {
    return $skip;
}
redsys_ucp_webhook_signature_algoFilter

Filters the signature algorithm used to sign UCP/commerce webhook deliveries. Defaults to rfc9421.

Parameters
NameTypeDescription
$algostringThe signature algorithm. Return the (possibly modified) value.

Source: classes/shared/class-redsys-commerce-webhook-dispatcher.php:85.

PHP
add_filter( 'redsys_ucp_webhook_signature_algo', function ( $algo ) {
    return $algo;
} );

ACP 19

redsys_acp_session_createdAction

Fires when a new ACP checkout session is created.

Parameters
NameTypeDescription
$checkout_idstringThe ACP checkout/session id.
$orderWC_OrderThe order.
$statearrayThe session state.
$provider_idstringThe provider id that created the session.

Source: classes/acp/class-redsys-acp-checkout-service.php:136.

PHP
add_action( 'redsys_acp_session_created', 'my_acp_session_created', 10, 4 );
function my_acp_session_created( $checkout_id, $order, $state, $provider_id ) {}
redsys_acp_session_updatedAction

Fires when an ACP session is updated.

Parameters
NameTypeDescription
$checkout_idstringThe ACP checkout/session id.
$orderWC_OrderThe order.
$statearrayThe updated session state.
$provider_idstringThe provider id.

Source: classes/acp/class-redsys-acp-checkout-service.php:917.

PHP
add_action( 'redsys_acp_session_updated', 'my_acp_session_updated', 10, 4 );
function my_acp_session_updated( $checkout_id, $order, $state, $provider_id ) {}
redsys_acp_session_status_changedAction

Fires when an ACP session's status changes, keeping it in sync with the WooCommerce order status.

Parameters
NameTypeDescription
$checkout_idstringThe ACP checkout/session id.
$new_acp_statusstringThe new ACP status.
$orderWC_OrderThe order.
$old_wc_statusstringThe previous WooCommerce order status.

Source: classes/acp/class-redsys-acp-order-sync.php:157.

PHP
add_action( 'redsys_acp_session_status_changed', 'my_acp_status_changed', 10, 4 );
function my_acp_status_changed( $checkout_id, $new_acp_status, $order, $old_wc_status ) {}
redsys_acp_complete_handoffAction

Fires when an ACP session completes its handoff for an order.

Parameters
NameTypeDescription
$checkout_idstringThe ACP checkout/session id.
$orderWC_OrderThe order.
$payloadarrayThe handoff payload.

Source: classes/acp/class-redsys-acp-checkout-service.php:1029.

PHP
add_action( 'redsys_acp_complete_handoff', 'my_acp_handoff', 10, 3 );
function my_acp_handoff( $checkout_id, $order, $payload ) {}
redsys_acp_session_ttl_minutesFilter

Filters the TTL, in minutes, for an ACP session. Defaults to 60.

Parameters
NameTypeDescription
$ttlintThe TTL in minutes. Return the (possibly modified) value.
$checkout_idstringThe ACP checkout id.
$orderWC_OrderThe related order.

Source: classes/acp/class-redsys-acp-checkout-service.php:113.

PHP
add_filter( 'redsys_acp_session_ttl_minutes', 'my_acp_ttl', 10, 3 );
function my_acp_ttl( $ttl, $checkout_id, $order ) {
    return 90;
}
redsys_acp_skip_handoff_signature_checkFilter

Filters whether the handoff signature check should be skipped for an ACP checkout. Defaults to false.

Parameters
NameTypeDescription
$skipboolWhether to skip the check. Return the (possibly modified) boolean.
$checkout_idstringThe ACP checkout id.

Source: classes/acp/class-redsys-acp-manager.php:262.

PHP
add_filter( 'redsys_acp_skip_handoff_signature_check', '__return_false', 10, 2 );
redsys_acp_handoff_ttlFilter

Filters the TTL for an ACP handoff token.

Parameters
NameTypeDescription
$ttlintThe handoff TTL (in seconds). Return the (possibly modified) value.

Source: classes/acp/class-redsys-acp-manager.php:284.

PHP
add_filter( 'redsys_acp_handoff_ttl', function ( $ttl ) {
    return $ttl;
} );
redsys_acp_cleanup_batch_sizeFilter

Filters the batch size used by the ACP cron cleanup. Defaults to 50.

Parameters
NameTypeDescription
$batch_sizeintThe batch size. Return the (possibly modified) value.

Source: classes/acp/class-redsys-acp-cron.php:41.

PHP
add_filter( 'redsys_acp_cleanup_batch_size', function ( $size ) {
    return 100;
} );
redsys_acp_idem_ttlFilter

Filters the TTL for ACP idempotency keys.

Parameters
NameTypeDescription
$ttlintThe idempotency TTL (in seconds). Return the (possibly modified) value.
$kstringThe idempotency key.

Source: classes/acp/class-redsys-acp-idempotency.php:60 (and 1 other location in the same file).

PHP
add_filter( 'redsys_acp_idem_ttl', 'my_acp_idem_ttl', 10, 2 );
function my_acp_idem_ttl( $ttl, $k ) {
    return $ttl;
}
redsys_acp_well_known_languagesFilter

Filters the supported languages advertised in the ACP .well-known document.

Parameters
NameTypeDescription
$languagesarrayThe languages list. Return the (possibly modified) array.

Source: classes/acp/class-redsys-acp-manager.php:165.

PHP
add_filter( 'redsys_acp_well_known_languages', 'my_acp_languages', 10, 1 );
function my_acp_languages( $languages ) {
    return $languages;
}
redsys_acp_well_known_documentFilter

Filters the ACP .well-known discovery document before it is served.

Parameters
NameTypeDescription
$docarrayThe well-known document. Return the (possibly modified) array.

Source: classes/acp/class-redsys-acp-manager.php:226.

PHP
add_filter( 'redsys_acp_well_known_document', 'my_acp_well_known', 10, 1 );
function my_acp_well_known( $doc ) {
    return $doc;
}
redsys_acp_webhook_supported_eventsFilter

Filters the list of webhook event types supported by the ACP webhook dispatcher.

Parameters
NameTypeDescription
$defaultsarrayThe supported events. Return the (possibly modified) array.

Source: classes/acp/class-redsys-acp-webhook-dispatcher.php:74.

PHP
add_filter( 'redsys_acp_webhook_supported_events', 'my_acp_events', 10, 1 );
function my_acp_events( $defaults ) {
    return $defaults;
}
redsys_acp_webhook_batch_sizeFilter

Filters the batch size used when dispatching ACP webhooks. Defaults to 25.

Parameters
NameTypeDescription
$batch_sizeintThe batch size. Return the (possibly modified) value.

Source: classes/acp/class-redsys-acp-webhook-dispatcher.php:177.

PHP
add_filter( 'redsys_acp_webhook_batch_size', function ( $size ) {
    return 50;
} );
redsys_acp_webhook_timeoutFilter

Filters the HTTP request timeout for an ACP webhook delivery.

Parameters
NameTypeDescription
$timeoutintThe timeout in seconds. Return the (possibly modified) value.
$webhookmixedThe webhook being delivered.

Source: classes/acp/class-redsys-acp-webhook-dispatcher.php:223 (and 1 other location in the same file).

PHP
add_filter( 'redsys_acp_webhook_timeout', 'my_acp_webhook_timeout', 10, 2 );
function my_acp_webhook_timeout( $timeout, $webhook ) {
    return $timeout;
}
redsys_acp_webhook_request_argsFilter

Filters the HTTP request arguments used when delivering an ACP webhook.

Parameters
NameTypeDescription
$argsarrayThe wp_remote_post request args. Return the (possibly modified) array.
$webhookmixedThe webhook subscription.
$event_typestringThe event type.

Source: classes/acp/class-redsys-acp-webhook-dispatcher.php:242.

PHP
add_filter( 'redsys_acp_webhook_request_args', 'my_acp_request_args', 10, 3 );
function my_acp_request_args( $args, $webhook, $event_type ) {
    return $args;
}
redsys_acp_webhook_event_payloadFilter

Filters the payload sent for an ACP webhook event.

Parameters
NameTypeDescription
$dataarrayThe event payload. Return the (possibly modified) array.
$event_typestringThe event type.
$checkout_idstringThe related ACP checkout id.

Source: classes/acp/class-redsys-acp-webhook-dispatcher.php:449.

PHP
add_filter( 'redsys_acp_webhook_event_payload', 'my_acp_payload', 10, 3 );
function my_acp_payload( $data, $event_type, $checkout_id ) {
    return $data;
}
redsys_acp_webhook_skipFilter

Filters whether an ACP webhook delivery should be skipped for a given event. Defaults to false.

Parameters
NameTypeDescription
$skipboolWhether to skip. Return the (possibly modified) boolean.
$event_typestringThe event type.
$webhookmixedThe webhook subscription.

Source: classes/acp/class-redsys-acp-webhook-dispatcher.php:215 (and 1 other location in the same file).

PHP
add_filter( 'redsys_acp_webhook_skip', 'my_acp_webhook_skip', 10, 3 );
function my_acp_webhook_skip( $skip, $event_type, $webhook ) {
    return $skip;
}
redsys_acp_webhook_allow_httpFilter

Filters whether plain HTTP (non-HTTPS) webhook URLs are allowed for ACP webhook subscriptions. Defaults to false (HTTPS required). Return true to allow HTTP (not recommended in production).

Parameters
NameTypeDescription
$allowboolWhether HTTP is allowed. Return the (possibly modified) boolean.
$urlstringThe webhook URL being validated.

Source: classes/acp/class-redsys-acp-webhook-rest.php:252.

PHP
add_filter( 'redsys_acp_webhook_allow_http', '__return_false', 10, 2 );
woocommerce_mcp_allow_insecure_transportFilter

Filters whether insecure (non-HTTPS) transport is allowed for ACP/MCP authentication requests. Defaults to false. Return true only in trusted development environments.

Parameters
NameTypeDescription
$allowboolWhether insecure transport is allowed. Return the (possibly modified) boolean.
$requestWP_REST_RequestThe incoming request.

Source: classes/acp/class-redsys-acp-auth.php:351.

PHP
add_filter( 'woocommerce_mcp_allow_insecure_transport', '__return_false', 10, 2 );

OAuth and well-known 3

redsys_oauth_supported_scopesFilter

Filters the list of OAuth scopes supported by the plugin's UCP OAuth server.

Parameters
NameTypeDescription
$scopesarrayThe supported scopes. Return the (possibly modified) array.

Source: classes/ucp/class-redsys-ucp-oauth-server.php:106.

PHP
add_filter( 'redsys_oauth_supported_scopes', 'my_oauth_scopes', 10, 1 );
function my_oauth_scopes( $scopes ) {
    return $scopes;
}
redsys_oauth_scope_alias_mapFilter

Filters the map of OAuth scope aliases used by the OAuth server.

Parameters
NameTypeDescription
$maparrayThe alias map. Return the (possibly modified) array.

Source: classes/ucp/class-redsys-ucp-oauth-server.php:133.

PHP
add_filter( 'redsys_oauth_scope_alias_map', 'my_oauth_alias_map', 10, 1 );
function my_oauth_alias_map( $map ) {
    return $map;
}
redsys_oauth_client_id_prefixFilter

Filters the prefix used when generating OAuth client ids, by client type.

Parameters
NameTypeDescription
$prefixstringThe client id prefix (defaults to {client_type}_). Return the (possibly modified) prefix.
$client_typestringThe client type.

Source: classes/ucp/class-redsys-ucp-oauth-server.php:258.

PHP
add_filter( 'redsys_oauth_client_id_prefix', 'my_oauth_prefix', 10, 2 );
function my_oauth_prefix( $prefix, $client_type ) {
    return $prefix;
}

Misc / text / URLs 5

redsys_thankyou_page_textFilter

Filters the text shown on the order received / thank-you page for Redsys orders.

Parameters
NameTypeDescription
$textthabksstringThe thank-you text. Return the (possibly modified) text.
$order_idintThe WooCommerce order id.

Source: includes/thank-you-receipe.php:52.

PHP
add_filter( 'redsys_thankyou_page_text', 'my_thankyou_text', 10, 2 );
function my_thankyou_text( $textthabks, $order_id ) {
    return __( 'Thank you, your payment was received.', 'my-textdomain' );
}
redsys_docs_urlFilter

Filters the documentation URL linked from the plugin's entry in the WordPress plugins list.

Parameters
NameTypeDescription
$urlstringThe docs URL. Return the (possibly modified) URL.

Source: classes/class-plugin-list-links-redsys-premium.php:57.

PHP
add_filter( 'redsys_docs_url', function ( $url ) {
    return 'https://example.com/my-docs/';
} );
redsys_apidocs_urlFilter

Filters the API documentation URL linked from the plugin's entry in the WordPress plugins list.

Parameters
NameTypeDescription
$urlstringThe API docs URL. Return the (possibly modified) URL.

Source: classes/class-plugin-list-links-redsys-premium.php:58.

PHP
add_filter( 'redsys_apidocs_url', function ( $url ) {
    return $url;
} );
redsys_support_urlFilter

Filters the support URL linked from the plugin's entry in the WordPress plugins list.

Parameters
NameTypeDescription
$urlstringThe support URL. Return the (possibly modified) URL.

Source: classes/class-plugin-list-links-redsys-premium.php:59.

PHP
add_filter( 'redsys_support_url', function ( $url ) {
    return $url;
} );
redsys_onboarding_menu_slugFilter

Filters the admin menu slug used by the Redsys onboarding / setup guide screen.

Parameters
NameTypeDescription
$slugstringThe menu slug (defaults to redsys-onboarding). Return the (possibly modified) slug.

Source: classes/class-redsys-setup-guide.php:45.

PHP
add_filter( 'redsys_onboarding_menu_slug', function ( $slug ) {
    return $slug;
} );

Other hooks 2

redsys_ucp_oauth_authorization_server_metadataFilter

Filters the OAuth Authorization Server Metadata document (.well-known/oauth-authorization-server) served by the UCP layer.

Parameters
NameTypeDescription
$docarrayThe metadata document. Return the (possibly modified) array.

Source: classes/ucp/class-redsys-ucp-oauth-metadata.php:124.

PHP
add_filter( 'redsys_ucp_oauth_authorization_server_metadata', 'my_oauth_as_metadata', 10, 1 );
function my_oauth_as_metadata( $doc ) {
    return $doc;
}
redsys_ucp_oauth_protected_resource_metadataFilter

Filters the OAuth Protected Resource Metadata document (.well-known/oauth-protected-resource) served by the UCP layer.

Parameters
NameTypeDescription
$docarrayThe metadata document. Return the (possibly modified) array.

Source: classes/ucp/class-redsys-ucp-oauth-metadata.php:183.

PHP
add_filter( 'redsys_ucp_oauth_protected_resource_metadata', 'my_oauth_pr_metadata', 10, 1 );
function my_oauth_pr_metadata( $doc ) {
    return $doc;
}

Get the full hooks library

Every action and filter shown here ships with the WooCommerce Redsys Gateway Premium plugin.