• 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.

Payment Process

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

asp_order_before_insert

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

Payment Button on the Payment Popup Window

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.

Below Payment Button on the Payment Popup Window

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;
}

Above Payment Button on the Payment Popup Window

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;
}

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

Support Links

  • Support Forum
  • Support Contact

Search

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