custom-fields

Only allow edit of custom field once per customer on My account > edit account in WooCommerce

≡放荡痞女 提交于 2021-01-29 17:12:39
问题 I have added a DOB field to the WooCommerce My account section Account details . The field is a date field (date of birth). The customer can edit and save. Problem is; the customer can edit and save over and over again. This is a problem because of the discount that I would like to automatically apply based on the DOB date. If the customer can edit this field more than once; they can potentially get a discount each and every day. For obvious reasons, this cannot happen. I need help in making

Need shipping cost to depends on custom field (Woocommerce)

时间秒杀一切 提交于 2021-01-28 03:48:48
问题 I used Woocommerce Easy Checkout Fields Editor plugin to create a custom drop-down field in billing section. How do I make the cost of delivery vary depending on what is selected in this field (there are two options) 来源: https://stackoverflow.com/questions/46232628/need-shipping-cost-to-depends-on-custom-field-woocommerce

Save Order item custom field in Woocommerce Admin order pages

家住魔仙堡 提交于 2021-01-19 08:01:31
问题 I have add custom fields in back office order for each line products : (source: com-pac.ovh) My problem is that I don't know how to save this fields. Can you please help me? function cfwc_create_custom_field() { $args = array( 'id' => 'custom_text_field_title', 'label' => __( 'Custom Text Field Title', 'cfwc' ), 'class' => 'cfwc-custom-field', 'desc_tip' => true, 'description' => __( 'Enter the title of your custom text field.', 'ctwc' ), ); woocommerce_wp_text_input( $args ); } add_action(

Save Order item custom field in Woocommerce Admin order pages

送分小仙女□ 提交于 2021-01-19 08:00:10
问题 I have add custom fields in back office order for each line products : (source: com-pac.ovh) My problem is that I don't know how to save this fields. Can you please help me? function cfwc_create_custom_field() { $args = array( 'id' => 'custom_text_field_title', 'label' => __( 'Custom Text Field Title', 'cfwc' ), 'class' => 'cfwc-custom-field', 'desc_tip' => true, 'description' => __( 'Enter the title of your custom text field.', 'ctwc' ), ); woocommerce_wp_text_input( $args ); } add_action(

Save Order item custom field in Woocommerce Admin order pages

徘徊边缘 提交于 2021-01-19 07:56:43
问题 I have add custom fields in back office order for each line products : (source: com-pac.ovh) My problem is that I don't know how to save this fields. Can you please help me? function cfwc_create_custom_field() { $args = array( 'id' => 'custom_text_field_title', 'label' => __( 'Custom Text Field Title', 'cfwc' ), 'class' => 'cfwc-custom-field', 'desc_tip' => true, 'description' => __( 'Enter the title of your custom text field.', 'ctwc' ), ); woocommerce_wp_text_input( $args ); } add_action(

Also change WooCommerce Minicart item price based on product custom field

≡放荡痞女 提交于 2020-12-31 15:03:39
问题 Based on Allow customer to set the product price (giftcard) and add to cart if sum is minimum 100 in WooCommerce, which answers my initial question - I am left with one small problem regarding the WooCommerce minicart. The product price is not updated accordingly to what the customer submits using the giftcard field. So I have two different solutions whereof both fail. This is what I tried: add_filter('woocommerce_widget_cart_item_quantity', 'custom_wc_widget_cart_item_quantity', 10, 3 );

Also change WooCommerce Minicart item price based on product custom field

泄露秘密 提交于 2020-12-31 15:02:46
问题 Based on Allow customer to set the product price (giftcard) and add to cart if sum is minimum 100 in WooCommerce, which answers my initial question - I am left with one small problem regarding the WooCommerce minicart. The product price is not updated accordingly to what the customer submits using the giftcard field. So I have two different solutions whereof both fail. This is what I tried: add_filter('woocommerce_widget_cart_item_quantity', 'custom_wc_widget_cart_item_quantity', 10, 3 );

Also change WooCommerce Minicart item price based on product custom field

我的未来我决定 提交于 2020-12-31 15:00:05
问题 Based on Allow customer to set the product price (giftcard) and add to cart if sum is minimum 100 in WooCommerce, which answers my initial question - I am left with one small problem regarding the WooCommerce minicart. The product price is not updated accordingly to what the customer submits using the giftcard field. So I have two different solutions whereof both fail. This is what I tried: add_filter('woocommerce_widget_cart_item_quantity', 'custom_wc_widget_cart_item_quantity', 10, 3 );

Also change WooCommerce Minicart item price based on product custom field

梦想与她 提交于 2020-12-31 14:59:18
问题 Based on Allow customer to set the product price (giftcard) and add to cart if sum is minimum 100 in WooCommerce, which answers my initial question - I am left with one small problem regarding the WooCommerce minicart. The product price is not updated accordingly to what the customer submits using the giftcard field. So I have two different solutions whereof both fail. This is what I tried: add_filter('woocommerce_widget_cart_item_quantity', 'custom_wc_widget_cart_item_quantity', 10, 3 );

How should I change the woocommerce_form_field HTML Structure?

回眸只為那壹抹淺笑 提交于 2020-12-26 12:17:22
问题 I'm using WooCommerce: Add Checkout Fees Based on Custom Radio Button from businessbloomer My question is about woocommerce_form_field() which is used in part 1 // etc... echo '<div id="checkout-radio">'; echo '<h3>Customize Your Order!</h3>'; woocommerce_form_field( 'radio_choice', $args, $chosen ); echo '</div>'; // etc... The structure of the HTML that woocommerce_form_field( 'radio_choice', $args, $chosen ); outputs is <p class="form-row form-row-wide update_totals_on_change" id="radio