This file contains hidden or 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 | |
// Update order status based on the id of payment gateway | |
function credit_card_complete_order_status( $order_id ) { | |
$order = new WC_Order( $order_id ); | |
if ( $order->payment_method == 'authorize_net' ) { | |
$order->update_status('completed', 'Automatically Completed'); | |
} | |
} |