• Resolved zelfmaak

    (@zelfmaak)


    I run a WooCommerce webshop and use the PW WooCommerce Gift Cards plugin. When a client uses a gift card and the total amount of the order is zero, it still asks for a payment method at checkout. I have already disabled all other plugins except PW and WooCommerce, and temporarily switched themes (I use Flatsome). Unfortunately, this did not resolve the issue. I also contacted the plugin owner and WooCommerce support. They confirmed that my WooCommerce settings are correct and that there are no conflicting plugins. The final thing I did was trying custom code for zero-value orders.
    I added this PHP code to my theme’s functions.php:

    add_action('woocommerce_thankyou', 'auto_complete_zero_value_orders');
    function auto_complete_zero_value_orders($order_id) {
        if (!$order_id) return;
    
        $order = wc_get_order($order_id);
        if ($order->get_total() == 0) {
            $order->update_status('completed');
        }
    }

    That also had no effect. I hope that someone else can help me further. Thanks in advanced.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Woocommerce zero-value orders keeps asking for payment method’ is closed to new replies.