It appears only price comes out and not the regular price

1

I have some products in WordPress using WooCommerce . The plugin uses 2 prices: regular price and the sale price . I need some of those products to show me the 2 prices, and in others, only the sale price :

The problem is that if you do not set regular price and if it comes out price , nothing is shown, and if you put the 2 price the 2 will come out

By means of code I think it is the solution, but I can not find where it can be. They also gave me a solution through consultations in PHPMyAdmin but I do not know how to put it:

UPDATE wp_postmeta AS s
LEFT JOIN wp_postmeta AS r
ON s.post_id = r.post_id
SET s.meta_value = r.meta_value
WHERE s.meta_key = '_sale_price'
AND r.meta_key = '_regular_price'                        

UPDATE wp_postmeta AS s
LEFT JOIN wp_postmeta AS r
ON s.post_id = r.post_id
SET s.meta_value = 'el valor que usted quiera'
WHERE s.meta_key = '_sale_price'
AND r.meta_key = '_regular_price'
AND s.post_id = 'el id que ud encontro'
    
asked by Juan Fernando Garcia zapata 06.06.2017 в 18:02
source

1 answer

0

You do not need to modify code, rather, understand the concepts:

Regular price: (Required) It is the normal price of the product. Sale price: (Optional) Must be less than the regular price because it is an offer.

    
answered by 28.07.2017 в 23:26