Good day, @elito-1
1. To rewrite cart totals amount saved template, copy file from
“wp-content/plugins/advanced-dynamic-pricing-for-woocommerce/templates/amount-saved/cart-totals.php”
to
“wp-content/themes/{YOUR_CURRENT_THEME}/advanced-dynamic-pricing-for-woocommerce/amount-saved/cart-totals.php”
and edit it.
2. There is only two options ‘Before order total’ or ‘After order total’.
I can add new locations using filter “wdp_cart_discount_message_places”
add_filter( "wdp_cart_discount_message_places", function ( $places ) {
// example
$places['woocommerce_cart_totals_before_order_total'] = __( 'Before order total', 'advanced-dynamic-pricing-for-woocommerce' );
$places["YOUR ACTION OR FILTER"] = "LABEL";
return $places;
} );
Thread Starter
e.lito
(@elito-1)
Woaw thank you for your reply.
1. OK
2. don’t work for me here is what i had to functions.php
add_filter( "wdp_cart_discount_message_places", function ( $places ) {
// example
$places["LITO_woocommerce_cart_totals_after_subtotal"] = "After cart subtotal (après le sous-total)";
return $places;
} );
I not have option ‘After cart sub total’ in the dropdown in customizer.
and in my ‘cart-totals.php’ i had this code to the place i want the amount saved <?php do_action( 'LITO_woocommerce_cart_totals_after_subtotal' ); ?>
What’s wrong ?
And thank you for reactivity.
Regards
Good day, @elito-1
Use “Code snippets” plugin, please. functions.php runs too late
Thread Starter
e.lito
(@elito-1)
PERFECT ! THANK YOU have a good day @rescueranger.
Good day, @elito-1
You are welcome 🙂