Skip to content

Instantly share code, notes, and snippets.

@Ahigh4life
Forked from webtoffee-git/functions.php
Created April 8, 2021 18:30
Show Gist options
  • Save Ahigh4life/6f8cf877e3f69dc63a434a2004f70de3 to your computer and use it in GitHub Desktop.
Save Ahigh4life/6f8cf877e3f69dc63a434a2004f70de3 to your computer and use it in GitHub Desktop.
Make order status completed when an order is placed - WebToffee WooCommerce Subscriptions
add_action( 'woocommerce_order_status_processing', 'processing_to_completed');
function processing_to_completed($order_id){
$order = new WC_Order($order_id);
$order->update_status('completed');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment