Home Forums WoodMart support forum Can I show regular price after sale price?

Can I show regular price after sale price?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #655397

    Hi,

    Right now by default it’s showing regular price and then sale price, and I want to show sale price first and after that regular price. How can I do that?

    Attachments:
    You must be logged in to view attached files.
    #655513

    Hello,

    I’ve checked your site, and currently the sale price is already showing first, followed by the regular price — which is exactly the order you’re aiming for.

    See Screenshot for clarification:https://ibb.co/LD9M4Fbr

    If you have any questions, feel free to contact us.

    Best Regards,

    #656095

    Hi,

    As shown in the screenshot: https://ibb.co/LD9M4Fbr

    Currently, the regular price is shown first, followed by the sale price. I believe there should be an option to switch this — to show the sale price first, then the regular price.

    Most big companies display prices this way, and it looks more attractive to customers.

    Could you please let me know how I can set it up to display sale price ➡️ regular price?

    Thanks in advance!

    #656104

    Hello,

    By default, WooCommerce displays the regular price first, followed by the sale price. This is the standard behavior of WooCommerce.

    However, if you’d like to switch the order and show the sale price first, Sorry, but there is no option in Theme Settings available for that.

    Try to add the following code in the functions.php of the child theme to achieve this.

    //Swap "Regular price" and "Sale price"
    function swap_sale_regular_price($price, $regular_price, $sale_price)
    {
        $price = '<ins>' . (is_numeric($sale_price) ? wc_price($sale_price) : $sale_price) . '</ins><del aria-hidden="true">' . (is_numeric($regular_price) ? wc_price($regular_price) : $regular_price) . '</del>';
        return $price;
    }
    add_filter('woocommerce_format_sale_price', 'swap_sale_regular_price', 10, 3);

    Best Regards,

    #656105

    Hi,

    Thank you for the quick reply.

    I just wanted to ask — will this have a negative impact on SEO? I wouldn’t want to compromise SEO or create a structure that goes against Google or search engine guidelines just for the sake of design. 🙂

    #656214

    Hello,

    No worries — this customization won’t negatively affect SEO. The code only changes the visual order in which the prices are displayed on the front end. It doesn’t alter the actual product schema or structured data that search engines like Google use for indexing.

    Best Regards,

Viewing 6 posts - 1 through 6 (of 6 total)