How can I schedule method in class as as_enqueue_async_action?
-
Not sure if this is possible.
I have an class object that has a lot of attributes.
There is also a method that needs to evaluate the attributes and come to a result. That process is HUGE, so I need to schedule it to run in the background and wait for it to be completed.Problem is that I can’t get actionscheduler to run that method. It fails all the time. I use this:
In class:
as_enqueue_async_action( [$this, 'pair_posts'] );
Where class is instantiated (as $color):
$color = new ColorPost();
add_action( 'init', '$color->pair_posts()');
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How can I schedule method in class as as_enqueue_async_action?’ is closed to new replies.