Hi Mirek,
As promised, we’ve just released a new plugin version 2.0.0, where I’ve added “Order meta” options to each rule’s settings (e.g. in “WooCommerce > Settings > Order Status Rules > Rule #1”). You need to set meta key and meta value there. They will be required for the rule to be executed on an order.
Also, I’ve added alg_wc_order_status_rules_do_apply_rule
filter. You probably won’t need it, but just in case, here is an example:
if ( ! function_exists( 'my_alg_wc_order_status_rules_do_apply_rule' ) ) {
add_filter( 'alg_wc_order_status_rules_do_apply_rule', 'my_alg_wc_order_status_rules_do_apply_rule', 10, 4 );
function my_alg_wc_order_status_rules_do_apply_rule( $do_apply, $order, $rule_num, $args ) {
if ( $do_apply && 1 == $rule_num && 'my_required_meta_value' !== get_post_meta( $order->get_id(), '_my_awesome_meta_key', true ) ) {
return false;
}
return $do_apply;
}
}
Please give it a try and let me know if something is not working as expected, or if you have any questions.
And if you like the plugin, please consider leaving me a rating here or here.