Skip Navigation

[Resolved] Shortcode prices don’t update

This thread is resolved. Here is a description of the problem and solution.

Problem: Prices displayed by the views_woo_price shortcode are not up-to-date. I would like to display the most up-to-date prices directly from WooCommerce.

Solution: You can trigger an update of the WooCommerce Views calculated price by going to Toolset > WooCommerce Views > Products Fields for Parametric Searches. This update should be run periodically. To display a price directly from WooCommerce, you must create your own custom shortcode.

Relevant Documentation:
https://toolset.com/documentation/user-guides/woocommerce-views-calculated-fields-and-batch-update/
https://stackoverflow.com/questions/47224791/display-product-prices-with-a-shortcode-by-product-id-in-woocommerce

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by axelA 5 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1241084

I am trying to:
Display latest prices directly from woocommerce.

Here is the shortcode:
Árs áskrift kr. [types field='views_woo_price' item='247'][/types] án Vsk.
Now showing:125100 but latest price is 130700

Link to a page where the issue can be seen:
hidden link

I expected to see:
Correct price 130700

Instead, I got:
Old price 125100

#1241126

Hi, you can trigger an update of the WooCommerce Views calculated price by going to Toolset > WooCommerce Views > Products Fields for Parametric Searches. This update should be run periodically. More information about that process is available here: https://toolset.com/documentation/user-guides/woocommerce-views-calculated-fields-and-batch-update/

If you want to get the information directly from WooCommerce without the WooCommerce Views calculation, you can use the WooCommerce API and your own custom code. Here's an example: https://stackoverflow.com/questions/47224791/display-product-prices-with-a-shortcode-by-product-id-in-woocommerce

#1243128

My issue is resolved now. Thank you!