• Resolved MagivofPvt

    (@namanm08)


    can anyone help me with more time? Can anyone add a background color to this code and make the text in the center also add text color with it… I will be waiting for reply. For reference, I have attached a screenshot below

    https://pasteboard.co/eEZnXLeejACE.png

    add_filter( ‘woocommerce_get_price_html’, ‘wc_custom_message’, 100, 2 );
    function wc_custom_message( $price, $product ){
    return $price.”<br>(15% off until May 31, 2020)”;
    }

Viewing 16 replies (of 16 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @namanm08,

    Thanks for the screenshots.

    I understand you want to add the phrase “You Save..” to your single product page to display how much the customer can save with that product.

    At the moment, there’s no default option for that in WooCommerce, and customizing that would require a bit of additional coding. Custom coding goes beyond the scope of support we are able to provide in this forum.

    That said, searching around I found this snippet that allows you to display the fixed amount of monetary value the customer is saving when a product is on sale:

    https://www.ecommercehints.com/woocommerce-show-fixed-amount-savings-on-sale-products

    If you require more help with the actual coding, we’d recommend hiring a developer or one of the customization experts listed at https://woocommerce.com/customizations/.

    If you have any other questions I recommend creating a new topic.

    I hope this helps.

Viewing 16 replies (of 16 total)
  • The topic ‘add custom discount message to price area’ is closed to new replies.