• Resolved Sebastian

    (@wordpressscyt)


    The plugin downloads expressCheckout.min.js and payPalplus.min.js to store it in /wp-content/uploads/woo-paypalplus/resources/js/paypal/. This is done with a weekly schedule (CronScheduler, wp_schedule_event) with a start time 1 minute in the future.

    When WordPress executes the schedule for the first time after 1 minute the hook isn’t executed and the schedule is canceled. This happens because the plugin skips initialization during cron handling.

    from Bootstrapper.php
    // Plugin doesn't work well with cron because of WooCommerce Session.
    // To now spread conditional here and there since we don't actually need to do stuffs
    // during cron I have disabled the plugin here.
    if (defined('DOING_CRON') && DOING_CRON) {
      return false;
    }

    The next time the plugin is initialized the schedule is reinitialized with an execution 1 minute into the future. This leads to an download of the Paypal scripts every minute.

    Best Regards, Sebastian

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Andreas W.

    (@aweissinpsyde)

    Hello @wordpressscyt

    can you please give me more information and send me the WooCommerce status report?

    Thank you so much

    Best regards
    Andreas

    Thread Starter Sebastian

    (@wordpressscyt)

    wordpress status report

    I just noticed that the Paypal scripts got updated often and some requests ran very slowly. Those which where downloading the Paypal scripts. That wouldn’t be very worrying if it happened once a week as was intended.
    Just as I said the plugin doesn’t initialize during execution of WordPress CRON schedules. The intended hook (paypalplus.assets_cache_cron_schedule_hook) is therefore not executed and also not rescheduled. The next time the plugin initializes a new CRON schedule is registered and the Paypal scripts are downloaded again.

    • This reply was modified 6 years, 1 month ago by Sebastian.
    Plugin Support Andreas W.

    (@aweissinpsyde)

    Hello @wordpressscyt

    can you please send a message to paypalplus@inpsyde.com with a link to this issue here and also your WooCommerce status report.

    Thank you
    Regards
    Andreas

    Plugin Support Andreas W.

    (@aweissinpsyde)

    Wegen Inaktivität geschlossen

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Paypal script download every minute’ is closed to new replies.