Forked from iamsathyaseelan/change_order_Status.php
Last active
March 11, 2020 06:17
-
-
Save rameshelamathi/c43e4f60cc1d9f2bf9560b4243acfe8c to your computer and use it in GitHub Desktop.
Snippet to treat cancelled and failed orders as abandoned carts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('rnoc_abandoned_cart_order_status','rnoc_abandoned_cart_order_status',10,2); | |
function rnoc_abandoned_cart_order_status($order_status,$order){ | |
if(in_array($order_status,array("cancelled","failed"))){ | |
$order_status = "pending"; | |
} | |
return $order_status; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment