Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WooCommerce Bestellung immer den Status "Fertiggestellt"
/**
* WooCommerce Bestellung immer den Status "Fertiggestellt"
*/
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );
function custom_woocommerce_auto_complete_order( $order_id ) {
if ( ! $order_id ) {
return;
}
$order = wc_get_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