• Resolved noobie

    (@noobie)


    Hi

    I have been attempting to work out how to use your plugin to display the discount based on the subtotal minus tax rather than including it.

    I had hoped that this might do the trick:

    protected function calculate_discount( $value, $subtotal_ex_tax ) {
    		if ( strstr( $value, '%' ) ) {
    			$value = ( $subtotal_ex_tax / 100 ) * str_replace( '%', '', $value );
    		}
    
    		return $value;
    	}

    Basically replacing $subtotal with $subtotal_ex_tax but it doesn’t seem to make any difference.

    Any suggestions welcomed!

    https://www.ads-software.com/plugins/woocommerce-payment-discounts/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Discount of subtotal exluding tax’ is closed to new replies.