for product A, and the UPS rate for product D. If a customer picked B and D, the shipping cost would be the flat rate for B + the UPS rate for D. Quite simple right? But then how do I set this up. My friend, Aparna, here at WisdmLabs gave me a solution. She said this was quite achievable, and chalked out a plan for the solution. [space] Here’s her idea. Disallow Option to Pick Shipping Method in WooCommerce To ensure that different shipping methods are applied for different products in WooCommerce, I have to first disallow customers from picking the shipping method they would prefer. (Well, that’s understood. I have fixed shipping methods for products, I cannot allow customers to choose). [space] Associate WooCommerce Products with Shipping Methods Next, there has to be an option to associate products with shipping methods, so that the appropriate cost gets applied. For example, It’s simple for product B. I can set a shipping class for the product, and then set a flat rate for the shipping class. Aparna said, this idea could help me with other products as well. I would need a settings option, where I would have to associate shipping classes with shipping methods. Cool. Seems logical. I‘ll try that. (She’d have to help me with the code too :) ) [space] Calculate WooCommerce Per Product Shipping Cost The final step, and of course the most important one, would be to calculate the total shipping cost for the products in my customer’s cart. For this, I’d have to fetch the shipping class for the product, and then get the associated shipping method, and then calculate the shipping cost. [space] All this is possible because WooCommerce provides the adequate hooks and filters. I’m assured of that, because Aparna did provide me with the filters. I’ll be trying out this solution, but I want you rooting for me. You could suggest features or point out a better solution. If I can make this ‘Per Product Shipping Methods’ for WooCommerce (that’s what I’m calling it) plugin work well, I’d be sure to offer it to you as well :)"/>

WooCommerce Per Product Shipping Methods

Share this post:
Contact Us to discuss your requirement