Home Forums WoodMart support forum Swap places for Price, Old, Price

Swap places for Price, Old, Price

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

    filipop
    Participant

    Right now the product has OLD PRICE, PRICE – I want to have this order

    PRICE, OLDPRICE (crossed), PERCENTAGE DROP

    Can this be done please

    #517776

    Hello,

    Try to add the following code in function.php of the child theme.

    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.

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