woocommerce

Pre populate Woocommerce checkout fields

时间秒杀一切 提交于 2021-02-08 06:33:29
问题 I am trying to pre-populate additional fields in the woocommerce checkout page but I am struggling with it. add_filter('woocommerce_checkout_get_value', function($input, $key ) { global $current_user; switch ($key) : case 'billing_first_name': case 'shipping_first_name': return $current_user->first_name; break; case 'billing_last_name': case 'shipping_last_name': return $current_user->last_name; case 'billing_phone': return $current_user->phone; break; case 'billing_company': case 'shipping

Woocommerce Grouped Product Table to Dropdown

99封情书 提交于 2021-02-08 06:07:40
问题 How do you put grouped product form/table into a dropdown menu in Woocommerce? Some of my products have more than 10 "child products". So the list can be very extensive. Maybe have one quantity box and add to cart with just the dropdown of the different options? Currently I don't see if it is possible to select a child product hand have the product image change. The following is the Grouped.php file for woo commerce: <?php /** * Grouped product add to cart * * @author WooThemes * @package

Woocommerce Grouped Product Table to Dropdown

你离开我真会死。 提交于 2021-02-08 06:06:56
问题 How do you put grouped product form/table into a dropdown menu in Woocommerce? Some of my products have more than 10 "child products". So the list can be very extensive. Maybe have one quantity box and add to cart with just the dropdown of the different options? Currently I don't see if it is possible to select a child product hand have the product image change. The following is the Grouped.php file for woo commerce: <?php /** * Grouped product add to cart * * @author WooThemes * @package

Add a Woocommerce fee based on shipping class and item quantity

纵然是瞬间 提交于 2021-02-08 05:47:42
问题 In Woocommerce I am trying to add a shipping fee if a cart item has a specific shipping class assigned to the related product. I would like this shipping fee to be multiplied by the cart item quantity… I have this working when a product is added to the cart and the quantity is increased and the additional shipping fee is increased also. However if I add another product with the same shipping class and increase the quantity the additional fee does not increase. This is my code: // Add

Add a Woocommerce fee based on shipping class and item quantity

穿精又带淫゛_ 提交于 2021-02-08 05:47:00
问题 In Woocommerce I am trying to add a shipping fee if a cart item has a specific shipping class assigned to the related product. I would like this shipping fee to be multiplied by the cart item quantity… I have this working when a product is added to the cart and the quantity is increased and the additional shipping fee is increased also. However if I add another product with the same shipping class and increase the quantity the additional fee does not increase. This is my code: // Add

First order discount for guest customers checking Woocommerce orders billing email

99封情书 提交于 2021-02-08 05:34:54
问题 By checking the GUEST customer's email address against processing and completed orders, I want to give the GUEST a "first order discount" if the email has no orders. It would be nice if this could happen as the guest types in their email. I think I've managed to make the discount code and now I am asking for help on merging these two codes, making it all work. Here's the discount code: add_action( 'woocommerce_cart_calculate_fees', 'first_time_order_discount', 10, 1 ); function first_time

First order discount for guest customers checking Woocommerce orders billing email

雨燕双飞 提交于 2021-02-08 05:34:25
问题 By checking the GUEST customer's email address against processing and completed orders, I want to give the GUEST a "first order discount" if the email has no orders. It would be nice if this could happen as the guest types in their email. I think I've managed to make the discount code and now I am asking for help on merging these two codes, making it all work. Here's the discount code: add_action( 'woocommerce_cart_calculate_fees', 'first_time_order_discount', 10, 1 ); function first_time

First order discount for guest customers checking Woocommerce orders billing email

旧时模样 提交于 2021-02-08 05:34:08
问题 By checking the GUEST customer's email address against processing and completed orders, I want to give the GUEST a "first order discount" if the email has no orders. It would be nice if this could happen as the guest types in their email. I think I've managed to make the discount code and now I am asking for help on merging these two codes, making it all work. Here's the discount code: add_action( 'woocommerce_cart_calculate_fees', 'first_time_order_discount', 10, 1 ); function first_time

Add a profile picture (file upload) on My account > edit account in WooCommerce

*爱你&永不变心* 提交于 2021-02-08 05:28:16
问题 I want to add a upload profile image field and save it on My account > edit account without any plugin in woocommerce. I added the below code in functions.php to add the profile picture on the my account page. add_action( 'woocommerce_edit_account_form', 'add_profile_imageto_edit_account_form' ); function add_profile_imageto_edit_account_form() { $user = wp_get_current_user(); ?> <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide"> <label for="favorite_color"><

Woocommerce Shop show categories

柔情痞子 提交于 2021-02-08 05:23:45
问题 I am new to wordpress so please still help with me if I get the language wrong. Using woocommerce to display a shop with variable products, I would like the shop link landing page to display the shop categories with the featured image of that category. My current shop page displays all products, with a pagination to other product pages and I cannot find the template for all products. When I go to shop page in wp-admin and click on the edit page it is empty, so am not sure how they are getting