Questions tagged [woocommerce-theming]
307 questions
3
votes
1 answer
How to hide products from the products shortcode 'woocommerce_shortcode_products_query' using product ids
I am using the woocommerce products shortcode to show some related products on a product page.
The product shortcode is as follows:
do_shortcode('[products limit="6" columns="6"]');
I am modifying the shortcode using the…

Jethro Hazelhurst
- 3,230
- 7
- 38
- 80
3
votes
1 answer
How to exclude a category from the category list widget for non admin users
I'm trying to exclude one category from the category list widget on the Shop and product archive pages for users other than the administrator. But for some reason it doesn't work.
Any help, thanks.
function exclude_category( $terms, $taxonomies,…

Р. Р.
- 75
- 7
3
votes
1 answer
How to display ACF field after the product name on the cart and order reviews in WooCommerce?
I have Advanced Custom Fields setup for post type on WooCommerce Products. So each product has 1 unique custom field.
I'm trying to display the custom field after the product name on the cart and the checkout page and order table…

Ross
- 453
- 4
- 16
3
votes
1 answer
Woocommerce how to redirect a custom end point on my-account page
It's the continue of my previous question
Woocommerce how to exclude the child pages (endpoints) of myaccount from the template redirect hook?
The login-register form has to be shown only like popup, so I've made redirect, to avoid default…

libertarian
- 345
- 1
- 15
3
votes
1 answer
WooCommerce show content after variation labels
I want to add content after variation name.
I find this hook and saw it's working before, but no on my test it's not :(
I want to ask, is there another hook/working method I can use to add content?
add_filter('woocommerce_attribute_label',…

Vladimir Kyatipov
- 686
- 4
- 17
3
votes
1 answer
WooCommerce custom order action does not work with trash status
I want to use woocommerce hook woocommerce_order_status_changed.
I want to fire something when new status of order is trash.
I used this function, which is working good for rest order statuses, except trash.
This is my code:
function…

Vladimir Kyatipov
- 686
- 4
- 17
3
votes
1 answer
Woocommerce how to set default_checkout_billing_country only if user is not logged in
I have this function and I only want to set the billing country if user is a guest, otherwise we should not change the billing country, but instead take the billing country as what the user has in his profile in WooCommerce.
add_filter(…

Isak La Fleur
- 4,428
- 7
- 34
- 50
3
votes
1 answer
Remove WooCommerce Cart Condition (Minimum Amount of a Product)
i'm a bit stuck for this.. i'm trying to remove a condition whenever the user adds a specific product, in this case a box of wines
So when i add a bottle of wine there's a minium amount condition so you have to add 3, but when you add a box the…

Claudio
- 31
- 3
3
votes
1 answer
WooCommerce how to display "you save X%" on checkout page
I have made a function that displays on checkout the total savings based on product discounts but I would like it to show the percentage saved above the order total, and if possible show it inside of a box.
Code:
function wc_discount_total() {
…

Carlos Menem
- 49
- 10
3
votes
1 answer
WooCommerce: Change related products heading and remove/change
I want to change the title text of the related products and remove the
for SEO reasons. I found some answers to change the title text here: Rename Related Products title in Woocommerce 3 But the code from there and the answer doens't work…

Cray
- 5,307
- 11
- 70
- 166
3
votes
1 answer
sale_flash badge cannot be removed from woocommerce product loop hook/action
I am trying to remove or edit the "sale!" badge is in woocommrce loop
In the content-product.php,
the comment block says the woocommerce_show_product_loop_sale_flash is hooked with woocommerce_before_shop_loop_item.
However it actually works with…

adrian li
- 457
- 8
- 19
3
votes
1 answer
Hook for custom price in Woocommerce order
I am currently developing a webshop where i needed to do a separate price function. So far, with the help of woocommerce hooks, i had managed to manipulate the price in both the shopping cart and the checkout, this works without any problems at all.…

Joel
- 33
- 1
- 4
3
votes
3 answers
Change Woocommerce Email Template Text
I got an email from woocommerce order like this:
I want to change Billing address text into Delivery address where could I change that text ?
Thank you.

Antonio
- 755
- 4
- 14
- 35
2
votes
1 answer
Woocommerce mini-cart ajax apply coupon
I have been going in circles with this I have added an apply coupon field to mini-cart.php and am trying to get it to run without refreshing the whole page. Any suggestions would be amazing help.
functions:
function apply_coupon_code(){
…

Dillon L.
- 45
- 5
2
votes
1 answer
WooCommerce how to perform a redirection for not logged in users
I need a redirection for all not logged-in users on my WordPress site.
All of them should every time be redirected to the login site. So that nobody without a login can access the site. Important is, I made this redirection because I have an API…

Luca Mezger
- 31
- 3