We are trying this type of code it changes subtotal but we want to change total according to subtotal without adding any discount field in order table.

// define the woocommerce_cart_subtotal callback 
function filter_woocommerce_cart_subtotal( $array, $int, $int ) { 
// make filter magic happen here... 
};       
// add the filter 
add_filter( 'woocommerce_cart_subtotal', 'filter_woocommerce_cart_subtotal', 10, 3 );

Read more here: How to apply discount on woocommerce subtotal and total on checkout?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: