How to Add a Custom Price Break-Up in WooCommerce
Support for Making Charges, GST, and Extra Taxes for Simple and Variable Products.
Overview
By default, WooCommerce allows you to set a single price for a product. However, for industries like jewelry, electronics, or specialized manufacturing, you often need to show a clear Price Break-up. This includes manufacturing costs (Making Charges), government taxes (GST), and additional surcharges.
This tutorial provides a complete PHP solution to integrate these fields directly into your WooCommerce dashboard and display them automatically on the front end.
How It Works
- Admin Integration: New fields are added to both Simple and Variable product settings.
- Dynamic Logic: The GST field can be set as a Fixed Amount or a Percentage of the base price.
- Cart Recalculation: The plugin hooks into
woocommerce_before_calculate_totalsto ensure the cart total reflects the sum of the base price and all additional charges. - Checkout Transparency: All extra charges are listed as metadata in the cart and checkout pages so customers know exactly what they are paying for.
The Plugin Code
Copy the code below into a new file named woocommerce-price-breakup.php and upload it to your wp-content/plugins folder, or paste it into your theme's functions.php file.
For download this plugin - visite this site - https://download-directory.github.io/
and paste here this link - https://github.com/sknetking/wp-plugins/tree/2019b0f08d1b199db04b9c8a7465a10222ce5994/wc-price-breakup
And download the plugin.
0 Comments