Hello @jointwebblog,
Please use below code snippet to themes function.php for restricting cashback credit when order status processing.
add_action('init', 'remove_wallet_cashback_in_status_processing');
function remove_wallet_cashback_in_status_processing() {
if (function_exists('woo_wallet')) {
remove_action('woocommerce_order_status_processing', array(woo_wallet()->wallet, 'wallet_cashback'), 12);
}
}
Could you please consider posting a review of our plugin? In addition to providing feedback, reviews can help other users to know who we are and what our plugin does.
Cheers!!!
Hi Subrata,
I guess the cashback allowing only on completed order sounds more promising, and while the order is processing we can show the customer pending cashback amount. You can consider it as a part of your next update, allowing admin to opt for this option or not, I believe most of the woo-commerce guys doing physical product shipping will opt for this feature.
Thanks
Amit
@amitaryan000,
Thanks for your valuable inputs. Yes, it’s a good idea we will try to include it in our next update.
Thanks and Regards,
Subrata Mal
add_action(‘init’, ‘remove_wallet_cashback_in_status_processing’);
function remove_wallet_cashback_in_status_processing() {
if (function_exists(‘woo_wallet’)) {
remove_action(‘woocommerce_order_status_processing’, array(woo_wallet()->wallet, ‘wallet_cashback’), 12);
}
}
the code does not work it behavior as same as old (it adds wallet amount in processing status )
Please use our GitHub version and below update code to themes function.php file to restrict cashback credit when order status processing.
add_filter('process_woo_wallet_general_cashback', 'process_woo_wallet_general_cashback_callback', 10, 2);
function process_woo_wallet_general_cashback_callback($process, $order){
if('processing' === $order->get_status('edit')){
return false;
}
return $process;
}
Thanks and Regards,
Subrata Mal