Skip to content

Tag: woocommerce

Create a custom user email

I actually wish to have a custom email when a user signs up on the website. Here is the existing code: current result: Thanks for creating an account on (website name). Your username is (user name). You can access your account area to view orders, change your password, and more at: https://www.(website name).…

WooCommerce shipping fileds required state

I’m using the function below to show / hide the shipping address section of the checkout based on if a customer chooses local pickup or not. It works fine, however some of the fields in the shipping section are required and so the checkout won’t work if local shipping is selected. Is there a way t…

How to skip duplicate data in foreach loop

I need help in removing or skipping duplicate data from foreach array, i try to use array_unique() but it doesn’t help. here’s my code. if i have more than 2 products of same category in cart it repeat the same data, which should not. this is what i get from print_r($term_prid) How can i get Answe…