woocommerce_gzd_template_sale_price_label

The WooCommerce Germanized woocommerce gzd template sale price label function.

Description

woocommerce_gzd_template_sale_price_label( $price, $from, $to, $product ); 

Parameters (4)

0. $price
The price.
1. $from
The from.
2. $to
The to.
3. $product
The product.

Usage

  1. if ( !function_exists( 'woocommerce_gzd_template_sale_price_label' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-germanized/includes/wc-gzd-template-functions.php'; 
  3.  
  4. // The price. 
  5. $price = null; 
  6.  
  7. // The from. 
  8. $from = null; 
  9.  
  10. // The to. 
  11. $to = null; 
  12.  
  13. // The product. 
  14. $product = null; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = woocommerce_gzd_template_sale_price_label($price, $from, $to, $product); 
  18.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-gzd-template-functions.php  
  1. function woocommerce_gzd_template_sale_price_label( $price, $from, $to, $product ) { 
  2.  
  3. if ( ! is_product() && get_option( 'woocommerce_gzd_display_listings_sale_price_labels' ) === 'no' ) 
  4. return $price; 
  5. else if ( is_product() && get_option( 'woocommerce_gzd_display_product_detail_sale_price_labels' ) === 'no' ) 
  6. return $price; 
  7.  
  8. return wc_gzd_get_gzd_product( $product )->get_price_html_from_to( $from, $to );