Skip to content

Instantly share code, notes, and snippets.

@iamsathyaseelan
Created March 11, 2020 06:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save iamsathyaseelan/4c3d53bd41b1290217ae55436c09a7fe to your computer and use it in GitHub Desktop.
Save iamsathyaseelan/4c3d53bd41b1290217ae55436c09a7fe to your computer and use it in GitHub Desktop.
changing the order status of the abandoned order to recover the order
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