In Woocommerce, I need to set the default ordering priority (sorting) of three fields on the checkout page: The first change depends on the choice of the ‘IT’ country code: postcode – ‘priority’ => 91, The other two are free of conditions, I just need to set the default priori…
Tag: wordpress
Make Shipping Method fields Mandatory on Woocommerce checkout page
I’m sure that there is a quick bit of code out there that will solve this issue, but I’m struggling to find it. I have a WordPress/WooCommerce website set-up and am using the WooCommerce Shipping Pro with Table Rate plugin to specify delivery rates as well as the local pickup option, within WooCom…
Change “Read More” button link on Out of stock Woocommerce products
Is it possible to change the Read More button of a out of stock product to redirect to a specific page/url or popup message instead of going to the single product view. Whenever I have an out of …
Display product category names in Woocommerce order details
In Woocommerce, How I can display the product category names in order details (and in backend of WordPress). Also is it possible to make them appear in the email notifications.
Hide shipping methods based on products categories in Woocommerce
With Woocommerce, I would like to hide all shipping methods except “Local pickup” when a defined products category is in cart… The code below does that for other product types, except variable products: What can I do to make it work for variable products too? Any help is appreciated. Answer I have…
Display total cart shipping volume value in Woocommerce
I use woocommerce for wholesale customers who order containers of furniture – normally 40 foot containers with a volume of 68 cubic meters. Is there a way I can show somewhere on the website – maybe in the header area a box with showing the total m3 of products in their basket? I need to show the …
Creating a function to logout a WordPress user?
I’m trying to create a function to logout WordPress users after a period of inactivity. The timed element is working as it should and redirecting users after a set period of time. The problem is that once the PHP script is loaded (in code sample), I run into the following error: Fatal error: Call to und…
Sort Orders IDs alphabetically based on the shipping last name in Woocommerce
I need to sort my $order_name (more specifically $order_shipping_last_name) alphabetically. I’ve tried many different basic php sort() methods, in many different places, and can’t get this to work. I’m assuming I’m missing something? In my code, get_all_orders_that_have_a_product_varia…
Shipping carrier custom fields validation in Woocommerce checkout page
I have added two custom input fields in the shipping method section by changing the template /genesis-sample/woocommerce/checkout/review-order.php I have also managed to get them conditionally required. Only when the specific radio button is checked, the input fields appear and become required. I am using jQu…
Change order of cart columns without overriding template files in Woocommerce
Is there a solution to change the order of the cart columns without copying the file in my own template folder? The reason is, that I don’t want to overwrite such a crucial template file. Unfortunately, the order is hardcoded as table in the file cart.php and not inside a function. Is there in this case…