WooCommerce
May 27, 2020

Add a select field that will change price in Woocommerce simple products

To add a select field in simple products (like in variable products) that will update base price depending on the dopdown selected value, try this:

Code goes in function.php file of your active child theme (or active theme).

Related Post


WooCommerce Remove the Additional Information and Order Notes fields

We can remove the Additional Information and Order Notes fields in WooCommerce checkout page with 2 filters that you add to functions.php file.

How to Change “Return to Shop” Button text in WooCommerce

Change “Return to Shop” Button text in WooCommerce a WordPress plugin this is quit easy to change it using gettext filter. If you are not using shop or name it something like back to home or store. Code goes in function.php file of your active child theme (or active theme).

How Create Custom Order in Woocommerce

Paste the code where you can get the customer data Here is the function for creating the order

Disable Payments on WooCommerce

You are using WooCommerce for your eCommerce website. A thing is you want to disable payment on your website, but disabling in WooCommerce payment setting WooCommerce > Settings > Payments will not work and display There are no payment methods available. Add this code to functions.php file of theme.

Remove Product From Cart Programmatically Woocommerce

We can remove product from WooCommerce cart using remove_cart_item() function with $product_id. Code goes in function.php file of your active child theme (or active theme).

Get product details from $product object WooCommerce

I am publish this article for get values from WooCommerce $product object. You can get all information of product from $product object. When we have $product object. Get $product object by $product_id. Get $order object by $order_id. Get products from $cart object.


Leave a Reply

Your email address will not be published. Required fields are marked *