We are using Dokan to power a WooCommerce multi-vendor marketplace. This is configured so that the admin receives a commission as a "collected fee" in Stripe as part of the Stripe Connect payment processing. The vendors receive the rest of purchase funds for their products.

By default, Dokan applies shipping fees to every vendor that is part of the transaction (so if shipping is $5, and there are two vendors, the customer is charged $10, once per vendor).

We asked Dokan how to charge for shipping only once per order, since our site admin ships all vendor items together as one package. They told us to add the following code to our child-theme functions.php file:

remove_filter( 'woocommerce_cart_shipping_packages', 'dokan_custom_split_shipping_packages' );

This works correctly because the shipping fee is only applied once to the whole order at checkout, instead of once per vendor.

Problem

However, when we test the transaction (stripe is in test mode), the shipping fee does not seem to actually get charged. The WooCommerce order screen shows that the credit card is charged the whole order amount. The vendors receive their payments via stripe for their product costs. The admin receives the "collected fees" through Stripe for their commission of the product cost.

But we cannot find where the shipping fee goes. It's not in the admin Stripe account, and it does not show up in the vendors stripe accounts.

We do not know if it gets charged at all, because with Stripe in test mode, we don't actually see what the customer's credit card statement looks like. However, the WooCommerce order reports show that the shipping fee was charged.

Are we missing something?

2

There are 2 best solutions below

0
On

This question is going to be specific to either Dokan or WooCommerce, but whatever you see in your Stripe Testmode Dashboard is what would have happened in livemode, so if it's not working there in testmode, then it's not going to work in livemode.

0
On

Dokan calculates each vendor's shipping rate separately. If you need a single shipping rate then it is totally your own need. You can disable multiple shipping package rates on the cart but this will require modification in the core file of the Dokan plugin. By default, there is no way to pay once if the delivery is the same place but from multiple vendors.

However, if you are managing the shipping cost as admin and the vendor is not configuring their own shipping you can make a few modifications to achieve the changes.

You can use this on your child-theme functions.php:

remove_filter( 'woocommerce_cart_shipping_packages', 'dokan_custom_split_shipping_packages' );

remove_filter( 'woocommerce_shipping_package_name', 'dokan_change_shipping_pack_name');

remove_action( 'woocommerce_checkout_create_order_shipping_item', 'dokan_add_shipping_pack_meta');`