$75.00
Demo Video
Category: WooCommerce
Tags: get_cart, get_meta, get_price, update_meta_data, wc_get_price_to_display, wc_price, woocommerce_add_cart_item_data, woocommerce_admin_process_product_object, woocommerce_checkout_create_order_line_item, woocommerce_get_item_data, woocommerce_product_options_pricing, woocommerce_single_product_summary, woocommerce_wp_text_input
This code, dynamically updates the product price, per unit, when an additional fee has been added to the single product options pricing field.
Once you set the additional price per unit, the product price changes once the checkbox is checked :
In this example, we add a price of 0.40 Euro’s to the custom field below the regular price on the single product edit screen.
The additional fee is multiplied by the product quantity when the checkbox is checked.
Watch the demo video to see how it works.
Installation
There’s only 1 step :
Copy and paste the code to the end of your child themes functions file or custom functionality/code snippets plugin.
Leave a Reply