i’m a little bit stuck. I’ve figured out how to retrieve the addresses assigned to a customers profile via the follow: But I can’t for the life of me figure out what the hook or whichever is required in order to get the shipping address that is being used for the calculation of shipping on the order checkout page. My
Tag: wordpress
Show JS alert on a form php
I have the following php code, which is a wordpress hook to display an address autocomplete form on my website’s cart page. The function was written in functions.php file. I dont want the customer’s to enter their unit numbers or house numbers. As such, I want to display a simple js alert if a customer enters “/” charachter in the
i am adding add_action inside a model of wordpress plugin but it is showing error unexpected identifier
this is my model file i am facing error that is: Answer Your class definition is not correct. your not defining the scope of the functions, and you need to refer back to the class in the add action
wordpress redirect users to the same URL they request appending parameters according to role
I am working on a Wordpress website with multiple roles. My target is to redirect user with a specific role when they request pages like orders in the admin area to go to a filtered URL having their id. example: User requests: www.site.com/wp-admin/edit.php?post_type=shop_order This Applies only to the role “tester” My Approach was: Rewriting the code now gave me error,
How to display thumbnail image from custom post type in another post type?
I have two custom post types “book” and “author”. I want to display author’s thumbnail in book’s post card. I think here should be loop inside the loop, but don’t understand how to implement it. Answer If you use ACF with Post Object field type, change your <– author thumbnail –> section with the following code don’t forget to change
How to display category thumbnail on WooCommerce category page?
I created a WooCommerce category, added description and an image to it. There are some products in the category too. Looking at the category in frontend (/product-category/mycat/) I see category description and product images – but not a category image. I tested it with all default WP themes and with Storefront too – category image is in no theme visible.
Countdown For WooCommerce Products
I create function to get the date and turn it to countdown. This my function code: And this my javascript code which is in “countdown.js” file: This code works on single product page, but when I try this in the product archive, it only works on the first product and does not work on the rest products. I want each
Excluding categories in WordPress with “list_terms_exclusions” not showing results
I am using the filter list_terms_exclusions to exclude categories in the Wordpress admin panel for users with a certain role. The following code is what I have put together: This is “almost working”. When I go to “Categories” in Wordpress admin, I see that the total counted categories is correct (there is over 200 categories, but 8 should be returned
Modifying single.php on child theme “Mikado Newsflash”
I have a website with “Mikado Newsflash” theme and a custom child theme. I can add functions on child theme and that, but if I modify single.php I get no results. Even if I delete the code on main theme it still works. Is it being called somewhere else? I’ve modified core templates such in framework/modules/blog/templates/singles and no result. Any
Add custom taxonomy to my custom posts type wordpress
I’ve been trying to add a custom posts type to my wordpress page but its not showing up. What am I doing wrong? It feels like its only a small thing but I’m not seeing it as I me fairly new to the custom posts type’s. What I want is to create pages for the teams at our company where