Not normally, since the express checkout feature is supposed to have the user select a shipping method. You may be able to simulate your situation by making your products “virtual”, which would make them not require shipping at all. You could then add “free shipping” later on the orders if that’s important. You would then need to check “Always ask for address” in the settings, too, or have the filter ‘woo_vipps_express_checkout_ask_for_address’ return true.
You could probably also try to add the free shipping when creating the express checkout order, noting that you don’t want more shipping. That would be in the action
do_action('woo_vipps_express_checkout_order_created', $orderid);
Here, you would create a WC_Shipping_Rate object of the correct type, then add a WC_Order_Item_Shipping with this shipping rate to the order. Then add the metadata $order->update_meta_data('_vipps_needs_shipping', false) and save the order. If you have checked “always ask for address” that should probably work as intended.
Thread Starter
Marija
(@marijastuntcoders)
Thanks for the response!
The first approach isn’t viable for us, but the second one works!
Kind regards,
Marija