• Resolved Lyk

    (@lyk-1)


    Hello!

    I have noticed 2 issues:

    1. I uncheck the Refresh only when products changed: in the feeds and hit save. The option is saved.
    But after some time, when opening the settings again, it appears as checked.
    Have tried to narrow down when this happens, but haven’t reached any conclusion.
    Any clues or advice?

    2. I have noticed some cases where I changed the sales price of products and the feed is not updated. Crons etc are all set and running.

    Does it make any difference if the products are updated from the product page or from the quick edit of woocommerce in the products dashboard?

    On that issue, I wanted to ask the following:
    If I run the woosea_cron_hook, should it be the same as if the feed is refreshed as scheduled?
    In other words, is it ok to manually run that cron in order to check what happens when a feed refresh happens, but without having to wait for the refresh interval?

    Moreover, would this also be the same as doing a manual refresh via the button?

    Thank you and keep up the good work!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    Thanks for using our plugin and reaching out to us.

    With regards to your questions:

    1. The only scenarios I can think of that could cause this kind of behaviour is when you make updates to your feed configuration (such as unchecking the feature you mention) when that feed is also in the process of updating or when other feeds are updating. Secondly, are you perhaps using (object) caching (such as Redis) that is caching feeds configurations;

    2. No, it makes no difference if you update products from your product page or the quick edit. In both cases the updated sales price should make it to your feed(s).

    Yes, when you run the woosea_cron_hook you will indeed trigger an automated update of feeds that are set to an hourly refresh interval. When an user is doing a manual update it will do exactly the same, trigger the woosea_cron_hook.

    Thread Starter Lyk

    (@lyk-1)

    Hello and thank you for your reply.

    1. Yes redis is used for both db and object caching. In the wp installation, w3total cache is taking care of the caching.
    By the way, feeds are excluded from the page caches (and we are also checking the files directly on the server to make sure that we always see the actual file)

    Regarding the db cache, the plugin offers options to:
    – Never cache the following pages:
    – Ignored query stems:
    – Reject query words: eg ^\s*update\b
    – Reject constants (Disable caching once specified constants defined.): eg. DOING_CRON

    Should we add something as an exception?

    2. Ok! So I guess the only difference of the manual click is that is always regenerates, regardless of the Refresh only when products changed, right?

    I will make a few more check with that in mind and let you know.
    Also, how does the Refresh only when products changed works? It adds an action to save_post and sets a flag when it runs? And before refreshing it checks whether the flag is set?

    Thank you!

    Hi,

    Thanks for your reply.

    1.) We have been having serious issues with Redis in the past and unfortunately we have never been able to solve those. I do think that it is causing the issue at hand and that it is undoing changes you make to your feed configuration (as those are saved in your DB). Unfortunately we know too little of the Redis configuration features to know what could potentially solve this.

    2.) Yes, you are correct on both assumptions. That is exactly how it works.

    Thread Starter Lyk

    (@lyk-1)

    Hello again,

    1) I see. So I guess the save settings issue could be related to Redis. I think this could be ok and I could even temporarily disable redis, change the changes and re-enable.

    2) Nice. Could you tell where is this flag saved so that I could check when/if it is set? Furthermore, could the not-refresh be related to redis too?

    Thanks!

    1.) Check, that indeed should be a solution
    2.) Yes, the not refreshing could definitely be related to Redis as with any feed configuration, the “option” that determines if a feed needs to be refreshed or not is also saved in your database.

    When the WP option woosea_allow_update contains the value ‘no’ than the feed will not be updated as no product changes have been recorded.

    Thread Starter Lyk

    (@lyk-1)

    I took a quick look in the code and as you said it seems that the flag is save in the option woosea_allow_update. (answer came in while I was writing this)

    It is very likely I misunderstand something, but are we sure this works as expected?
    All the updates of this option are setting it to no and it seems to never change to yes.

    e.g. This part seems to be doing the opposite than expected:

    if(get_option('product_changes')){
    				$before = get_option('product_changes');
    				$diff = array_diff($after, $before);
    				if(!$diff){
    					$diff['product_id'] = $product_id;
    				} else {
    					// Enable the product changed flag
    			        	update_option('woosea_allow_update', 'no');
    				}
    				delete_option('product_changes');
    			} else {
    				// Enable the product changed flag
    				update_option('woosea_allow_update', 'no');
    			}

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Not updating feed & not saving option’ is closed to new replies.