• Resolved mattybulman

    (@mattybulman)


    Hi, when an item is on sale. Does the discount tier become disbaled? Im looking for a plugin that when the item is on sale the tier is disabled so does discount the sale price too.

Viewing 1 replies (of 1 total)
  • Plugin Author Mykola Lukin

    (@bycrik)

    Hello @mattybulman,

    No, when the item is on sale, the pricing tiers active. If you use percentage based tiers, the discount will be calculated based on sale price instead of the regular.

    You can use the following piece of code to disable tiered pricing for products that are on sale:

    add_filter( 'tiered_pricing_table/price/pricing_rule', function ( \TierPricingTable\PricingRule $rule, $productID ) {
    $product = wc_get_product( $productID );

    if ( $product && $product->is_on_sale() ) {
    $rule->setRules( array() );
    }

    return $rule;
    }, 9999999, 2 );

Viewing 1 replies (of 1 total)
  • The topic ‘Sale Items’ is closed to new replies.