Developers - Actions, Filters & Functions

Volume Pricing Table

Function and filters related to the pricing table.


Filter: rp_wcdpd_volume_pricing_table_range_label
This allows overriding the label of one pricing range in the table
 
Parameters:
$label (string) default label
$product (object) product object
$rule (array) rule's data
$quantity_range (array) quantity range data
 

Filter: rp_wcdpd_volume_pricing_table_range_price
This allows overriding the price of one pricing range in the table
 
Parameters:
$display_price (string) default price
$product (object) product object
$rule (array) rule's data
$quantity_range (array) quantity range data
 

Filter: rp_wcdpd_volume_pricing_table_data

This allows overriding the whole data of the table

Parameters:
$data (array) default data
$product (object) product object
$rule (array) rule's data 


Function: rp_wcdpd_display_volume_pricing_table($product_id)
This allows to display volume pricing table manually for specific product
 
Parameters:
$product_id (int) product id
 
Location: \wc-dynamic-pricing-and-discounts\extensions\promotion-volume-pricing-table\includes\functions.php


Live Price Update
Function and filters related to the live price displayed on the product pages ("Price ...")
 

Filter: rightpress_live_product_price_update_label_html

This allows overriding the label ("Price").

Parameters:
$label (string) default label
 


Filter: rightpress_live_product_price_update_price_html

This allows overriding the updated price HTML

Parameters:
$display_price (string) default price
$price (double) default price
$label (string) label
$product_id (int) product id
$variation_id (int) variation id
$variation_attributes (array) variation's attributes
$quantity (int) quantity
 

Filter: rightpress_live_product_price_update_extra_data

This allows adding any extra data to the JSON response (in "extra_data" array key).

Parameters:
$data (array) empty array by default
 
 
Total Saved
Function and filters related to the "Total Saved" feature.
 

Filter: rp_wcdpd_promotion_total_saved_display

This filter allows overriding the initial calculated amount of the total discount

Parameters:
$amount (double) total discount amount
$hook (string) current action hook
$include_tax (bool) whether or not the tax is included
 


Filter: rp_wcdpd_promotion_total_saved_display

This allows overriding whether or not to show the whole string.

Parameters:
$bool (bool) whether or not to show it.
$amount (double) total discount amount
$hook (string) current action hook


Filter: rp_wcdpd_promotion_total_saved_label

This allows overriding the default label.

Parameters:
$label (string) default label
$amount (double) total discount amount
$hook (string) current action hook


Filter: rp_wcdpd_promotion_total_saved_formatted_amount

This allows overriding the formatted amount.

Parameters:
$amount (string) default formatted amount
$amount (double) total discount amount
$hook (string) current action hook


Filter: rp_wcdpd_promotion_total_saved_div_classes

This allows overriding the classes passed to the "div" container

Parameters:
$default_classes (string) default classes value: "woocommerce-message"


Filter: rp_wcdpd_promotion_total_saved_tr_classes

This allows overriding the classes passed to the "tr" tag

Parameters:
$default_classes (string) default classes value (empty)

 

Have more questions? Submit a request