Search the Community
Showing results for tags 'checkout page'.
-
I am trying to populate a custom field called "Customer Type" current user role. The custom field is displayed on my checkout page. I tried the below in my functions.php of my child theme and thought it would work but it does nothing. Can anyone tell me what I might be doing wrong? $user = wp_get_current_user(); function onboarding_update_fields( $fields = array() ) { $fields['customertype'] = $user; return $fields; } add_filter( 'woocommerce_checkout_fields', 'onboarding_update_fields' );
- 10 replies
-
- php
- woocommarce
-
(and 1 more)
Tagged with:
-
I have a php shopping cart that I am editing that someone else developed. My php skills are still very beginner. Currently the customer must order $500 to place an order if their cart contains less they get a message - order must be $500. They want this to change so that any items that are in the categories of (accessories, scarves and jewelry) ONLY have a min order total of $150 but ALL other items in the other categories STILL have a min order total of $500. So in summary I need it to check if there are any items in accessories, scarves and jewelry - the total of those items OLY needs to be $150 if not a message needs to be displayed "boutique items have $150 min order." Then I need it to check all other items in the cart and those items ONLY need to total $500 or a message needs to be displayed "$500 min order required". There is a lot of other code mixed in with the current orderDetails page about coupons, etc which is throwing me off a little. I have attached a copy of orderDetails page so you could have all the code. I have also attached a screenshot of the cart page since it is unavailble for viewing unless you have a login. Thanks for the help. I need to get this fixed ASAP...I have gotten close a few times but just can not get it exact. orderDetails.php