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
<?php | |
add_filter( 'woocommerce_payment_complete_order_status', 'wmg_auto_complete_virtual_orders', 10, 3 ); | |
/** | |
* Automatically complete orders with only virtual products | |
* | |
* @param string $payment_complete_status Order status used after an order payment is received | |
* @param int $order_id ID of the order being processed | |
* @param WC_Order $order Order object being processed |