1

I have a WooCommerce webshop with WooCommerce subscriptions and i want to test the renewal process (emails etc) for a recurring payment. Normally i would use the method as described in the following article.

This always worked prior to updating subscriptions to 3.0 (with the renewed Action Scheduler). But now nothing happens.

After pressing the run button the window refreshes and the scheduled action is still there. I do get a notice with a message "The next queue will begin processing in approximately X seconds.". Sometime i get the notice "A new queue has begun processing. View actions in-progress »". When following the link no in-progress actions are found.

The action I want to run has a date in the future and I have both WCS_DEBUG and WP_DEBUG set to true.

I'm pulling out my hair trying to find why the action cannot be run manually. Did I miss something?

  • WooCommerce v 3.9.3

  • WooCommerce subcriptions v 3.0.1

  • WordPress v 5.3.2

See screenshot of the situation here

mujuonly
  • 11,370
  • 5
  • 45
  • 75
  • Did some more debugging. I installed and activated the storefront theme to make sure the problem is not in the theme. I also deactivated al plugins exept WC and WC subscriptions. Both makes no difference. – user1633595 Mar 20 '20 at 16:33
  • As of my understanding, manually running scheduled action will create new scheduled action (pending). Now it creates automatically only when the next payment time is up – mujuonly Apr 18 '20 at 06:38

1 Answers1

1
    // Maybe clear the existing schedule for this hook
    if ( false !== $next_scheduled && $next_scheduled != $event_time ) {
        $this->unschedule_actions( $action_hook, $action_args );
    }

    if ( 0 != $event_time && $event_time > current_time( 'timestamp', true ) && $next_scheduled != $event_time ) {
        as_schedule_single_action( $event_time, $action_hook, $action_args );
    }

When manually running the task, it checks for the next schedule time is up and it sets only if the time is up. ( WCS 3.0.1 )

mujuonly
  • 11,370
  • 5
  • 45
  • 75