This code checks whether the WooCommerce plugin is active, gets the regular and sale prices of a product, and then outputs the price depending on whether a sale price is present. If a sale price is present, the sale price is outputted, otherwise, the regular price is outputted.
Was this code snippet helpful?
YesNo