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