Add filter for timing options
At file admin/views/meta-box-timing.php, starting at line 15, replace
$when_to_run
->set_name_base( $option_base )
->set_name( ‘when_to_run’ )
->set_options(
[
‘immediately’ => __( ‘Run immediately’, ‘automatewoo’ ),
‘delayed’ => __( ‘Delayed’, ‘automatewoo’ ),
‘scheduled’ => __( ‘Scheduled’, ‘automatewoo’ ),
‘fixed’ => __( ‘Fixed’, ‘automatewoo’ ),
‘datetime’ => __( ‘Schedule with a variable’, ‘automatewoo’ ),
]
)
->add_data_attr( ‘automatewoo-bind’, ‘timing’ );
with
$when_to_run
->set_name_base( $option_base )
->set_name( ‘when_to_run’ )
->set_options(
apply_filters(‘automatewoo/workflow/timing_options’, [
‘immediately’ => __( ‘Run immediately’, ‘automatewoo’ ),
‘delayed’ => __( ‘Delayed’, ‘automatewoo’ ),
‘scheduled’ => __( ‘Scheduled’, ‘automatewoo’ ),
‘fixed’ => __( ‘Fixed’, ‘automatewoo’ ),
‘datetime’ => __( ‘Schedule with a variable’, ‘automatewoo’ ),
] )
)
->add_data_attr( ‘automatewoo-bind’, ‘timing’ );
That way one can use filter ‘automatewoo/workflow/queue_date’ to process the new timing option.
One of the use cases is to not send SMS messages during night/sleep time.
Thank you.
Cheers,
Gabriel Reguly
Current Status
Completed
Last updated: November 9, 2021
2 comments
Log in to comment on this feature request.
Brent Shepherd: Thank you Brent.
Marked this feature request as
Completed
This is now available in AutomateWoo 5.5.6.