Title: Price function overrides
Last modified: December 11, 2023

---

# Price function overrides

 *  Resolved [Rune Rasmussen](https://wordpress.org/support/users/syntaxerrorno/)
 * (@syntaxerrorno)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/price-function-overrides/)
 * Hi there,
 * It seems like you’re just replacing the price outputs instead of overriding it,
   which causes incompatibility with other plugins, like t.ex. the rich metadata
   in Rank Math.
 * Instead of the rich metadata displaying the sale price, it displays the original
   price, and the stores surely will lose sales because of it.
 * Any ideas? We could add a snippet fixing it, but then we need to know what to
   use instead of t.ex. wc_get_price_including_tax.
 * And even though it’s maybe better if you tried making the sale price function
   in your plugin more compatible with the core and other plugins.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Support [mialewp](https://wordpress.org/support/users/mialewp/)
 * (@mialewp)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/price-function-overrides/#post-17267635)
 * Hi Rune,
   Good day!Thanks for your report.The integration of specific analytic
   plugins requires the use of custom hooks. And YayPricing does not change the 
   product price, we change the cart item price instead. We will integrate with 
   Rank Math as soon as possible.When it’s done, we will let you know soon.Best 
   regards,Mia
 *  Thread Starter [Rune Rasmussen](https://wordpress.org/support/users/syntaxerrorno/)
 * (@syntaxerrorno)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/price-function-overrides/#post-17267657)
 * Hi there,
 * You do indeed replace the price display on the products also, not just in the
   cart.
 * And I would like to know what I should call in the snippet to get the correct
   price displayed for rich metadata, since we needed this to be correct “yesterday”.
   😉
 *  Plugin Support [alina98](https://wordpress.org/support/users/alina98/)
 * (@alina98)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/price-function-overrides/#post-17268226)
 * Hi [@syntaxerrorno](https://wordpress.org/support/users/syntaxerrorno/),
   Sorry,
   but this is how our logic works. We do not replace the product price but we change
   it in other hooks so as to be compatible with others.We do not encourage replacing
   product price in db.Thank you!Kind regards,Alina
 *  Thread Starter [Rune Rasmussen](https://wordpress.org/support/users/syntaxerrorno/)
 * (@syntaxerrorno)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/price-function-overrides/#post-17268246)
 * I’m talking about the display for sure, nobody have mentioned anything about 
   the database, so your reply sadly doesn’t fit as usual.
 * So I need to know your “hook”, what to use in our snippet to fix this issue today,
   without having to wait for you to maybe fix it sometime in the future.
 *  Plugin Support [alina98](https://wordpress.org/support/users/alina98/)
 * (@alina98)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/price-function-overrides/#post-17268510)
 * Hi [@syntaxerrorno](https://wordpress.org/support/users/syntaxerrorno/) ,
   Sorry
   about that!This hooks is based on the target plugins. If you have problem with
   Rank Math, then we need to make a integration with it by using it’s hooks and
   implement in our plugin.May I know if you have issue with rank math metadata,
   please?
 * So, we will make an integration in our next version.
   Kind regards,Alina
 *  Thread Starter [Rune Rasmussen](https://wordpress.org/support/users/syntaxerrorno/)
 * (@syntaxerrorno)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/price-function-overrides/#post-17268618)
 * Sorry but I’m starting to wonder if you use Google translate to read/reply, or
   what is actually going wrong here each time? It’s really hard to communicate 
   with you Alina, much harder than any other of those replying here for this plugin,
   and it’s quite annoying – sorry to say.
 * Normally we can get the correct price using the WooCommerce price function ‘wc_get_price_including_tax’,
   for both default and sales prices in WooCommerce. Now, since you DOESN’T hook
   into this, but rather just overrides the price display, we don’t get the correct
   price when adding sales in your plugin. And my question now is what can we call
   to get the correct price (which price function in YayPricing), TODAY, without
   having to wait for some maybe in the future compatibility with Rank Math rich
   metadata?

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Price function overrides’ is closed to new replies.

 * ![](https://ps.w.org/yaypricing/assets/icon-256x256.png?rev=3056580)
 * [YayPricing - WooCommerce Dynamic Pricing & Discounts](https://wordpress.org/plugins/yaypricing/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yaypricing/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yaypricing/)
 * [Active Topics](https://wordpress.org/support/plugin/yaypricing/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yaypricing/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yaypricing/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [Rune Rasmussen](https://wordpress.org/support/users/syntaxerrorno/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/price-function-overrides/#post-17268618)
 * Status: resolved