How to Create a Simple WooCommerce Payment Gateway
…y the “Success” result since the order was placed, and redirect the return URL for that order (so we display the correct information). public function process_payment( $order_id ) { $order = wc_get_order( $order_id ); // Mark as on-hold (we’re awaiting the payment) $order->update_status( ‘on-hold’, __( ‘Awaiting offline payment’, ‘wc-gateway-offline’ ) ); // Reduce stock levels $order->reduce_order_stock(); // Remove cart WC()->cart->empty_cart();…