Hello @perties,
I hope you are well today.
I have passed your request on to the development team. They will check the viability of this and get back to you as soon as they can.
Kind regards,
Moshtafizur
Hi, do you have any update?
Hi @perties,
We are still working on it, sorry about that. The release should be ready in the next couple of days.
Hi, @perties,
We’ve decided to make a quick release for you. Please update the plugin to the latest v2.9.2 (released just a few minutes ago). Then you can achieve what you need with this PHP snippet:
add_action( 'alg_wc_order_status_rules_after_rule_applied', function ( $order, $rule_id ) {
$order->set_payment_method( 'cheque' );
$order->set_payment_method_title( 'Check payments' );
$order->save();
}, 10, 2 );
You need to replace cheque and Check payments with the appropriate values. You can check your “Account deposit” ID by going to “WooCommerce > Settings > Payments” and clicking on your method. Then you should be able to get the method’s ID from the URL, e.g.: /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=cheque
And the last note – you can also use the alg_wc_order_status_rules_before_rule_applied action instead of the alg_wc_order_status_rules_after_rule_applied. I.e., change the payment gateway right before changing the status instead of right after changing the status.
Please let me know what you think.
Hi, thank you very much. I was out of town and just returned tonight. I will test it tomorrow and let you know.
Hi, it looks like it is working. Will you update the next release with the snippet?