Okay
  Public Ticket #4513752
URGENT
Closed

Comments

  •  4
    John Adcox started the conversation

    We have a massive issue right now with the new product selector on the offers creation page...
    We have 40k products with a SALE price, and right now it's pulling in the regular price, we need it to use the sale price if exists always.

  •  2,615
    WebWizards replied

    Hi John,

    Thanks for reaching out. By default, the offers feature uses the regular price of products.

    If you want to use the sale price when it exists, you can add this code snippet to your site:

    add_filter('b2bking_offer_price_default', function($price, $product){
    if ($product->is_on_sale()){
    return $product->get_sale_price();
    }
    return $price;
    }, 10, 2);

    This snippet can be added to functions.php of your theme or using any code snippets plugin.

    Let me know if that works for you,

    Kind regards,
    Stefan