How to Customize Product Price fed to Affirm Product Message

[ad_1]

Hi @secureit

The Stripe plugin uses the function wc_get_price_to_display which is a WooCommerce provided function, to get the price that you’re seeing in the iframe. Can you link to the discount plugin that you’re using?

You could use the filter wc_stripe_output_display_items to modify that price. Here is an example:

add_filter('wc_stripe_output_display_items', function($data, $page, $gateway){
    if($page === 'product' && $gateway->id === 'stripe_affirm'){
        $data['product']['price_cents'] = wc_stripe_add_number_precision( $my_discount_price, get_woocommerce_currency() );
    }
});

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer