• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Payments Plugin for Stripe

Stripe payment plugins for your WordPress site

  • Home
  • Documentation
  • Addons
  • Login
    • Sign In
    • Edit Profile
    • Terms & Conditions
    • My Downloads
    • License Key
  • Support
    • Support Forum
    • Forum Search
    • Forum Login
    • Forum Registration
    • Email Support for Customers
  • Contact Us
  • Show Search
Hide Search
You are here: Home / Stripe Payments Plugin – Filter Hooks Reference

Stripe Payments Plugin – Filter Hooks Reference

Below is a list of action hooks that are available in the Stripe Payments Plugin.

Table of Contents

  • Payment Processing Related
  • Thank You Page
    • asp_stripe_payments_checkout_page_result
  • Stripe Payment Button
    • asp_additional_stripe_checkout_data_parameters
  • Stripe Orders Related
    • asp_order_before_insert
  • Payment Popup Window Related
    • asp_ng_pp_pay_button_text
    • asp_ng_pp_after_button
    • asp_ng_pp_output_before_buttons
    • asp_ng_pp_security_message_content
    • asp_ng_pp_output_add_styles
    • asp_ng_pp_output_add_scripts
  • Output Extra HTML or JavaScript on the Payment Popup Window
    • asp_ng_pp_extra_output_before_closing_body

Payment Processing Related

asp_ng_process_ipn_product_item_override

You can use this filter to override ASP_Product_Item class.

Parameters:

$item (object)
ASP_Product_Item object. 

asp_ng_process_ipn_payment_data_item_override

You can use this filter to override ASP_Payment_Data class.

Parameters:

$p_data (object)
false by default. If still false after filter execution, default ASP_Payment_data object is used.

$pi (string)
Stripe PaymentIntent ID.

asp_ng_handle_metadata

Can be used to update PaymentIntent metadata after payment is completed.

Parameters:

$metadata (array)
Set of key-value pairs. This can be useful for storing additional information about the payment in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

Thank You Page

asp_stripe_payments_checkout_page_result

This filter allows you to modify the output data on the Thank you/checkout result page. This can be used to add some additional details to the thank you page message shown by this plugin after a transaction.

Below is an example of how to use this filter:

add_filter('asp_stripe_payments_checkout_page_result', 'asp_custom_thank_you_msg', 10, 2);
function asp_custom_thank_you_msg ($output, $txn_data)
{
    //Do stuff
    //print_r($txn_data);//Lets see what transaction data is available in this array.
    $output .= 'This text will be added to the thank you page message.';
    return $output;
}

Stripe Payment Button

asp_additional_stripe_checkout_data_parameters

This filter can be used to add extra data parameters for stripe checkout.

Stripe Orders Related

asp_order_before_insert

This filter is executed before the order data is inserted into the orders table (after a transaction).

Payment Popup Window Related

asp_ng_pp_pay_button_text

This filter allows you to modify the payment button’s text on the payment popup window.

Below is an example of how to use this filter:

add_filter('asp_ng_pp_pay_button_text', 'custom_stripe_payment_popup_buy_button');
function custom_stripe_payment_popup_buy_button( $pay_btn_text )
{
    $pay_btn_text = 'Hit this button to pay %s';
    return $pay_btn_text;
}

If you put %s in the text, it will be replaced by the formatted total payment amount with currency symbol.

asp_ng_pp_after_button

This filter allows you to add some text below the payment button on the payment popup window.

Below is an example of how to use this filter:

add_filter('asp_ng_pp_after_button', 'custom_below_stripe_payment_popup_buy_button', 10, 2);
function custom_below_stripe_payment_popup_buy_button( $output, $data )
{
    $output .= 'This text will show below the payment button';
    return $output;
}

asp_ng_pp_output_before_buttons

This filter allows you to add some text above the payment button on the payment popup window.

Below is an example of how to use this filter:

add_filter('asp_ng_pp_output_before_buttons', 'custom_above_stripe_payment_popup_buy_button', 10, 2);
function custom_above_stripe_payment_popup_buy_button( $output, $data )
{
    $output .= 'Some text that will be shown above the payment button';
    return $output;
}

asp_ng_pp_security_message_content

This filter hook allows you to override the security badge and message displayed in the payment popup window when this feature is enabled, giving you full control over its content and presentation.

asp_ng_pp_output_add_styles

This filter hook can be used to include additional style-sheet files to the payment popup window.

asp_ng_pp_output_add_scripts

This filter hook can be used to include additional script files to the payment popup window.

Output Extra HTML or JavaScript on the Payment Popup Window

This filter allows you to add any custom HTML, JavaScript and CSS code directly into the payment popup window.

asp_ng_pp_extra_output_before_closing_body

Below is an example of how to use this filter hook:

add_filter('asp_ng_pp_extra_output_before_closing_body', 'extra_code_output_on_payment_popup', 10, 2);
function extra_code_output_on_payment_popup( $output )
{
    $output .= '<strong>This message will be shown on the payment popup</strong>';
    return $output;
}

Primary Sidebar

Featured Addons and Extensions

  • Subscription Payments Addon
  • Additional Custom Fields
  • Secure Downloads Addon
  • Apple Pay, Google Pay, Afterpay

Addon Bundle

Stripe Payments Addon Bundle

A Simple & Lightweight Plugin

Our Philosophy with the Plugin

Support Links

  • Support Forum
  • Support Contact

Search

Copyright © 2025 | Stripe Plugins | A member of the Tips and Tricks HQ family.