-1

I tried "Discount on specific products based on a daily time range in Woocommerce" answer thread, but the daily discount doesn't seem to work for all users, only for logged in users.

How can I make it work for all users (auth, guest, admin)???

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
  • I just tested the code on last WP and WC version on last storefront theme and it works perfectly for both unlogged users and logged in users (customers, shop managers and admins). Same thing on a different installation on WooCommerce 3.5.5… I have tested that on for simple products and on product variations (of a variable product)… So there is something else that is making trouble in your case, that can be your theme, another plugin or something else. – LoicTheAztec Sep 06 '19 at 23:05
  • Is this problem possible due to the fact that I am adding about 150 products to the variable $discounted_products? – karakym Sep 07 '19 at 15:15
  • If it works for admins on variable products with a lot of variations, it should also work for everybody... So the issue is not related to the fact that you are adding about 150 products to the variable $discounted_products. It could be related to a caching plugin or your hosting cache. – LoicTheAztec Sep 07 '19 at 15:46

1 Answers1

0

I contacted the hosting provider, they helped solve the problem!