• Hi – Everything was fine after the 8 hour ordeal yesterday. (See thread named Disaster: 3.0 broke my site). Just now, I went to modify the woocommerce shortcodes file to output orderby featured products and recent products as ‘rand’ rather than ‘date’ and voila… caused the woocommerce plugin to become deactivated. What could be causing this? Please help. I really don’t want to repeat the same procedure as yesterday. It cannot be a plugin conflict. Simply by modifying the woocommerce shortcode php file, how can this happen? I changed the ‘rand’ back to ‘date’ and it did nothing to fix it back. Just by editing the shortcode php, this happens? Makes no sense.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    Changing a shortcode to ‘rand’ won’t deactivate a plugin… Are you sure your host does not have controls in place to prevent rand usage? I know some do not like that because it can slow down servers.

    Thread Starter rocketrobin

    (@rocketrobin)

    It was never an issue before. But for sure, this is what caused the problem. I put it back to ‘date’ and it did not revert back. I will have to deactivate all plugins again and reactivate one by one.

    Thread Starter rocketrobin

    (@rocketrobin)

    I have now reactivated only the woocommerce plugin (and a couple of others related to having orders come in since a customer just phoned me and was wondering what was happening to the website)… I will now attempt to change the woocommerce shortcodes php file to output featured products and recent products as ‘rand’ instead of by ‘date’ in the orderby line. Let’s see what happens…

    Thread Starter rocketrobin

    (@rocketrobin)

    Done. Website appears to be unaffected as theory would predict and as you said, modifying shortcodes should not deactivate plugin. Now, will reactivate all plugins one by one…

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Let us know what you find.

    Thread Starter rocketrobin

    (@rocketrobin)

    So, as you can see, my website is running well again: https://www.rocketrobin.ca … I cleaned up and deleted unused plugins and did not reactivate a couple I thought may be the culprit(s) because I did not want to have to start all over again.
    However, I noticed another problem now. New order emails will not stop being sent! About 10 per minute! OMG. I had to shut down Postman SMTP immediately and YITH PDF Invoice (since someone pointed out that it conflicted with the wp_tmail function in wordpress (this plugin wasn’t working anyway after the woocommerce upgrade to 3.01 and I’ll have to find another fancy pdf invoice plugin).

    New order emails have stopped for now fortunately… So what do you suggest now? I believe that as of WooCommerce 3.0.0, a delayed CRON event is used to send emails? This certainly has the potential to be a pain for me. Probably need a fix for this. Because I really need Postman SMTP.

    Thread Starter rocketrobin

    (@rocketrobin)

    So, as you can see, my website is running well again: https://www.rocketrobin.ca

    Actually, I just noticed another issue: even though the output featured products and recent products are set to ‘rand’, the same products appear on every machine I have looked at today. There is no randomization happening. So, that function is not working correctly. Oh boy.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    You can disable the deferred email sending with https://gist.github.com/mikejolley/16ca078f5c74b401e6ba210644e3173d however note it was improved in 3.0.1 to use background processing (same as our updater) rather than cron directly.

    As for rand, I think you’re noticing things not new to 3.0 now ?? Rand will be ‘rand’ first time but once it’s cached (page caching? widget caching) it won’t be random any more. Rand is slow and not really recommended, better to show by date.

    Thread Starter rocketrobin

    (@rocketrobin)

    Thanks. It looks like the ‘rand’ function works only if I am not logged in as administrator, but you are correct, it is not reliable enough. Unfortunately, I need to use it. I am using flatsome theme with UX builder which allows me to set the options to random separately as well.

    Anyways, the problem with the emails seems okay for now, but a customer alerted me to yet a new problem. Dynamic Pricing plugin. It seems that they are not seeing their cart or checkout discount with minimum order. I checked all settings and logged them out of all locations, cleared transients, so we shall see what happens…

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Same problem as yesterday: 3.x causing major pain’ is closed to new replies.