Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

->sale_price

/**
 * Returns product price based on sales.
 * 
 * @return string
 */
function the_dramatist_price_show() {
    global $product;
    if( $product->is_on_sale() ) {
        return $product->get_sale_price();
    }
    return $product->get_regular_price();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+3 =