Incompatibility with WooCommerce PreOrders

Home Forums Calendar Products Event Aggregator Incompatibility with WooCommerce PreOrders

  • This topic has 11 replies, 5 voices, and was last updated 8 years ago by Nico.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1027198
    Adam Schwartz
    Participant

    Hi,

    I have a site that’s using the iCal Importer plugin and WooCommerce Pre-Orders. I’m seeing an issue where the preorder cron job, wc_pre_orders_completion_check, doesn’t get queued, and whenever I set the date for a preorder product, the date is saved incorrectly (ex. set to “2015-11-11 00:00”, save, it pops back up as “2015-11-10 16:00”). I’ve tried deactivating all other plugins and switching to default themes, and the only time these issues pop up is if the iCal plugin is activated.

    Any thoughts on what the issue is?

    Thanks,
    Mindy

    #1027251
    Cliff
    Member

    Hi Adam (or Mindy?). Thanks for your question.

    We cannot provide support for WooCommerce or its extensions, but I believe you’re saying it’s being affected only when iCal Importer is active.

    Do you have any iCal Importer recurring jobs or have you only used it for one-time imports?

    Does iCal Importer work correctly?

    If you have iCal Importer setup for recurring jobs, if you disable recurring jobs (i.e. only do one-time importing), does that still affect the WooCommerce extension as you stated it does?

    Have you viewed the WP Cron and noticed anything odd in there?

    One or more of these third-party plugins (i.e. we don’t support or guarantee them) may make it easier to view/modify the WP Cron:

    Hopefully some of this information will help you realize what the issue is or will enable you to provide us additional details.

    Thanks!

    #1027627
    Adam Schwartz
    Participant

    Hi Cliff,

    I totally understand not being able to support WooCommerce extensions, but yes, the issues go away as soon as I disable the iCal plugin (with the site using the 2015 theme, only WooCommerce, PreOrders, Events Calendar, and iCal plugins turned on). It at least seems to me that it may be messing with the site’s timezone settings; not sure on the cron, but perhaps the weird timezone settings is making the site think the cron has already been executed (it’s supposed to happen every 5 minutes).

    We’ve only used it for one time imports, and those worked; there weren’t any recurring import jobs saved. I just added a test recurring job, and that works as well, but the PreOrders issues continue to be issues.

    I have WP Crontrol on, and I just noticed that the “next run” times for future posts change when I de/activate the iCal plugin. A future post publication went from “2015-11-19 02:00:03” (with iCal on) to “2015-11-19 10:00:03” (with iCal off). Seems to support the thought that timezone settings are being changed.

    Thanks,
    Mindy (Adam’s the boss!)

    #1028266
    Cliff
    Member

    Thanks for helping me debug this issue.

    Would you be able to provide me some screenshots of what you’ve discovered with the cron viewer?

    I see you have the current version of our iCal Importer plugin, but do you also have the current version of the Woo add-on?

    If you do, it might also help to send us the plugin .zip along with the screenshots. You can mark your reply as Private.

    #1028298
    Adam Schwartz
    Participant

    This reply is private.

    #1028799
    Cliff
    Member

    Thanks for that information. Looking into the code, there’s nothing I saw that was obviously conflicting (like registering the same cron hook name or modifying the site’s timezone settings).

    So is your suspicion that the WordPress general settings timezone setting is being CHANGED by having both these plugins activated? If so, could you see what it’s set to before and after iCal Importer is activated?

    Do you notice any difference in the cron schedule if iCal Importer is setup for automatic/cron import and THEN you activate Woo Pre-Orders and then the cron schedule is correct overall? (i.e. order of operations)

    If you don’t end up getting this figured out with these testing options, would you mind grabbing your system information and pasting it here? Make sure to use the “Set as private reply” checkbox to protect your private information from the public.

    You can find the system info by going to WP Admin > Events > Settings, clicking on the “Help” tab, and scrolling down to the “System Information” box. (Or by going to [yoursite]/wp-admin/edit.php?post_type=tribe_events&page=tribe-events-calendar&tab=help)

    Thanks!

    #1028803
    Adam Schwartz
    Participant

    This reply is private.

    #1028818
    Cliff
    Member

    Thanks for all that helpful information.

    I searched for that function in iCal Importer directory and found it in use in this file: /wp-content/plugins/the-events-calendar-importer-ical/vendor/iCalcreator_3.0/iCalcreator.php

    Screenshot 2015-11-20 23.44.33

    Reference for ‘timezone_string’ option: http://codex.wordpress.org/Option_Reference

    I wonder if you edit this file’s code and test with it if you’ll notice any differences…

    If you’re able to do that, please let me know what you discover.

    Thanks so much!

    #1029697
    Adam Schwartz
    Participant

    Hi Cliff,

    Yes, commenting out that line does fix the issue with the cron times. Will this be removed in future updates to this plugin? Or should I do something else other than leaving it commented out?

    The wc_pre_orders_completion_check, however, was still missing from the list. Through further debugging, I found that the “addCronIntervals” function in /src/Tribe/Registrar.php (line 179) is missing a $schedules argument (per the cron_schedules filter: https://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules). Putting the argument back in fixed this issue.

    Thanks,
    Mindy

    #1030481
    Brook
    Participant

    Howdy Mindy,

    Thank you for reporting this! I really appreciate it.

    For now I would leave it commented out if I were you. We will discuss trying to fix this. The iCalcreator lib is actually a third party one that is essentially included with our plugin. We will have to discuss whether we wish to fork it or not. Forking a lib can impose a pretty large burden on the devs, so this will need a decent measure of discussion. That said we are actually strong proponents of never using date_default_timezone_set() in a WP install, so it is very possible we will choose to fork and fix this.

    I created a ticket for our strategist to look into this and discuss as needed. I added your thread here to the ticket, so you will get updates when there are some.

    Thanks again. Let us know if you have any more questions in the interim. Cheers!

    – Brook

    #1075788
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

    #1108453
    Nico
    Member

    Hi there,

    Just wanted to inform that maintenance release 4.1.3 is out. The update includes a fix for this issue.

    Please update the plugins to the latest version and re-test to see if the fix works for you.

    Best,
    Nico

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Incompatibility with WooCommerce PreOrders’ is closed to new replies.