In Progress

_sale_price_dates_from / _sale_price_dates_to do not work in Dynamic Visibility / Custom Field Query

4

Hi Greenshift Support,

I’m trying to use WooCommerce sale date meta fields in Greenshift Dynamic Visibility, but the condition does not seem to work as expected.

What I tested

I created a visibility condition using:

  • _sale_price_dates_from
  • _sale_price_dates_to

To test field detection, I set the rule to:

  • If _sale_price_dates_from exists, show the heading

However, the heading is still hidden even on products where _sale_price_dates_from should be present.

Expected behavior

If _sale_price_dates_from exists, the element should be visible.

Actual behavior

The element remains hidden, which suggests Greenshift is not detecting the meta field correctly or the field type is not being handled properly.

Notes

  • These are WooCommerce sale date meta fields.
  • I understand these values are stored as Unix timestamps.
  • I also tested {TIMESTRING:now}, but comparisons with these fields did not work.

Could you please confirm:

  1. Whether _sale_price_dates_from and _sale_price_dates_to are supported in Dynamic Visibility / Custom Field Query?
  2. Whether these fields need a specific format or path?
  3. Whether there is a recommended way to compare WooCommerce sale date meta values?

Thank you.

Fadhl Ba wazir

Replies

Responses

  1. use “not empty” condition

    or !=
    and keep empty value in condition

  2. Fadhl Ba wazir Avatar
    Fadhl Ba wazir
    Member

    I am having another problem. My goal is to show the discount only during the scheduled sales time by adding a condition using _sale_price_dates_from and _sale_price_dates_to with a dynamic custom field value {TIMESTRING:now}.Condition 1: _sale_price_dates_from <= {TIMESTRING:now}Condition 2: _sale_price_dates_to >= {TIMESTRING:now}But it did not work as expected. Please watch the video below; the expected outcome is to show the discount only on “Mamlakaty Necklace in Yellow Gold, Diamonds, and Malachite.”https://drive.google.com/file/d/1eDbjsmRtNDiuHDW9DLEFEp27nwvAb34D/view?usp=sharing

  3. Fadhl Ba wazir Avatar
    Fadhl Ba wazir
    Member

    Hi,Just wanted to follow up as I haven’t heard back from you in over a week. Looking forward to your response. Thanks!

Post a Reply