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).
WooCommerce default redirect on shop page when Cart is empty. The filter woocommerce_return_to_shop_redirect makes it easy to change Return to shop link. Code goes in function.php file of your active child theme (or active theme).
We can add product to WooCommerce cart using add_to_cart() function with $product_id. Code goes in function.php file of your active child theme (or active theme).
We can add product to WooCommerce cart using add_to_cart() function with $product_id. Code goes in function.php file of your active child theme (or active theme).
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).
To make the default “Ship to Different Address” checkbox checked in WooCommerce Checkout page, add below code on functions.php file. Disable “Ship to A Different Address” on WooCommerce Checkout, add below code on functions.php file.
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).
Update 3 (Only for a defined product ID) To make it work as you want to change the simple products prices only on single product pages (without altering archives product prices, related product prices, upsells and cross-sells) if any cart item doesn’t belong to a specific product category. Then you will need all this following […]
We need to use 2 different hooks: The first one just as yours without trying to change the price in it. The second one where you will change your cart item price. The code: Code goes in function.php file of your active child theme (or theme) or also in any plugin file.