Change Price by Product id

Home – SaaS Forums Presale questions Woo Price Calculator Change Price by Product id

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #4641

    Hello, I tried to change a product price according to the code in this link and also add a condition to it, but it seems it doesn’t work, nothing happens! any help? Thanks in advance!

    add_filter(‘woo_price_calculator_calculate_price’, ‘cmw_custom_price’, 10, 4);

    function cmw_custom_price($price, $product_id, $calculator_id, $data){

    if($product_id==36) { $price=100;}

    else{$price = $price*5;}

    return $price;


    Hi Mostafa,

    Your code is working ok in my test environment so it could be something related to your theme, plugin, etc.

    Could you please send your WP-admin and your FTP password to “”?

    Please remember to add the link of this page in your email.

    Kind Regards,

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.