Conflict with WooCommerce CRON Export Jobs

Hi,
I am using WP All Export jobs triggered by CRON for scheduled data exports from my WooCommerce websites.

When the export jobs are triggered manually, everything works as expected and there are no issues. However, when the job is triggered by CRON only variable products are exported and simple products are not picked up by the job.

After much testing I have identified that this issue appears when the Groups plugin is active on the site. Subsequently, there is something in the plugin that is preventing CRON jobs from accessing all the product types.

Any idea what this issue could be?

Thanks!

Posted in

Comments

7 responses to “Conflict with WooCommerce CRON Export Jobs”

  1. George Avatar

    Hi Michael,

    Thank you for your wait.
    I’ve also created a temp installation on http://www.wpallimport.com/try/ which you can visit and use with this link:
    http://courageous-jackal.w5.wpsandbox.pro/?upass=ZLpV0D72qc8p
    but still the results are normal, both variable and simple products are exported.

    Kind regards,
    George

  2. Hi Michael,

    That’s great thanks for mentioning, I’ll use that service key and keep you posted once I test it with a schedule.
    Regarding PHP memory increase suggested by Karim, please also check if indeed the server is using the allocated memory you set. It is possible that even if you set PHP memory to let’s say 256M, the server is restricted to a lower value.

    Kind regards,
    George

    1. michaelbroughton Avatar
      michaelbroughton

      Hi George,
      Great, looking forward to the results of your test!

      Concerning the PHP memory increase, I worked directly with my hosting provider to increase the allocated server memory to 1024Mb the other day, and that did not fix the issue. Subsequently, I think we can rule that out as the root cause.

      Cheers,

      Michael

  3. Hi Michael,

    I’m afraid that scheduled exports can’t run without a key unless I’m missing a setting.
    Therefore I think it’s better if you can provide us with a staging copy of your site where we can check the situation.

    Kind regards,
    George

    1. michaelbroughton Avatar
      michaelbroughton

      Hi George,
      Yes sorry, the scheduling service requires a key. The key is not site limited however, so I have saved it to my shared folder for your convenience. Please go ahead and use it on your test site.

      I am also happy to give you access to my staging site, so please let me know a secure way to pass those credentials to you.

      Finally, I left a comment for Kento on another post after he suggested that I try increasing the PHP memory. Unfortunately, this did not work (link to post and comments below)
      https://www.itthinx.com/plugins/groups/comment-page-16/#comment-916810

      Cheers,

      Michael

  4. michaelbroughton Avatar
    michaelbroughton

    Hi George,
    Thanks for the prompt reply.

    My site is private and limited to logged-in users only – I use the Force Login plugin for this. I do use Groups to group my products for site users, however that does not appear to be an issue because ALL of the variable products are being picked up by the CRON job, and ALL of the simple products are being missed. My product groupings include both simple and variable products so I am seeing it more as an issue with product type rather than groups.

    I am using the WP All Export plugin (part of the WP All Import suite of plugins), which you can download from the shared folder below:
    https://drive.google.com/drive/folders/1pQDUSpxPkK2NRdn2L8JyLW0W0LAdFa23?usp=sharing

    Probably best to install all four of these to your test site even though it is only an export issue and not an import one.

    Also, just to repeat that the export works smoothly when it is triggered manually, and it is only with CRON jobs that the issue arises. Although I can’t say for sure, it might have something to do with the changes that WordPress made to CRON during the last major update a month or two ago.

    Let me know if you need anything else.

    Cheers,

    Michael

  5. Hi Michael,

    Regarding products that fail exporting, do you use any Groups related restrictions or are they publicly accessible?
    Which is the plugin you are using for exporting? If it’s a premium one it would be handy if you can send us a copy to george at itthinx dot com so that we can replicate the situation and perform tests locally.

    Kind regards,
    George

Share