I’m currently working on integrating a retail price starting point, but I’m having some difficulty navigating your Developer Documentation and wondering if it’s still valid, I have tried all MRSP / RRP plugins and nothing seems to override your plugin or works with it. Your plugin seem to always look the standard sales price or a toggle to “If enabled, the plugin will always use the regular price to calculate percentage discounts. By default, the plugin uses the sale price if it exists“.
I’m thinking that is where I could override this? Like always use retail price to calculate percentage discounts
Specifically, I can’t seem to find the right hook yet, to track all the discounts effectively from the retail price. My goal is to add a new price field and have the plugin reference that for total savings instead of using the standard price as the starting point.
Any guidance you could provide would be greatly appreciated!
The documentation is valid, but it covers only basic concepts and does not include all available hooks.
Unfortunately, the plugin does not have a hook to substitute price is used for calculating discounts. Here is the code that is responsible for that part (tier-pricing-table/PriceManager.php line 145):
As you can see, it uses ->get_price() or ->get_regular_price() from a WooCommerce $product object. Technically, you can utilize the “woocommerce_product_get_price” hook to adjust it at the WooCommerce level, but that will change it everywhere on the site.
Is that the only place to control this globally, as I dig into your code I find the call for get_regular_price all over and still unsure how to make this work globally in a clean and consistent manner to do the following.
Maybe there is a better way, we just want to add an extra price field and have it follow that price field used in all the views and then have discounts broken down with the correct displays. We are also using our own shortcode version to create a message for the end results output on each view, that was fairly easy to control.
We also found no other plugin that supports retails price to be compatible with your plugin at all, they just conflict with each other and no simple way yet to make them work as they both seems to be competing for control, not to mention not programmed the same way.
It will be a mess to keep them working together when things change all the time, so we are forced to do it by hand to keep it clean or deal with so many nested conflicts of bad programming styles, so many plugins are not worth even using.
Yours is, it’s fairly well throughout, clean and simple, not a bloated ad laden, tracking mess, I just need to tweak it to make it work for my needs. 🙂
I’ve successfully gained control over many elements of the standard pricing overrides. However, I had to create a JavaScript for the tiered pricing, which isn’t ideal, as it appears that the standard price is hard-coded throughout the system without a centralized global control.
Currently, I’m facing a significant challenge with the cart pricing controls. While I can manage some aspects, there are others that seem to be prioritized too highly for me to override, regardless of my attempts. Is there a global control that governs the standard pricing?
As I explore the software further, it’s evident that it must have taken considerable time to develop, given the multitude of switches and controls involved. I feel like I’m navigating a complex maze of logic that only you are familiar with, and it will take me a while to fully understand it.
Could you please direct me to the master control or indicate where we need to make changes to adjust the standard pricing globally? I want to ensure we’re not encountering inconsistent data across different views.
I truly appreciate your assistance and the hard work you’ve already put into this.
Unfortunately, you’re correct, and there is no single place where you can substitute product price as the plugin relies on the WooCommerce $product object and its ->get_price() option, which has its own hook.
When it comes to the cart, tiered pricing plugin provides the “tiered_pricing_table/cart/product_cart_price” hook, which you can use to control end price calculated for cart items (it is used for different integrations, like product addons or multicurrency)
Thank you for your direction and help, after months of effort, we now have full override control of the plugin. A single injected file now overrides many of the files and sits above the plugin’s original code.
My primary concern is update management now: we are close to forking this plugin to introduce additional new rules and related features.
I need to decide how to proceed from here, since the direction of your future changes could really intersect with or conflict with our changes.
Do you have any thoughts or an open road map of future plans?