We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [woocommerce]

OFF TOPIC. Questions *specific* for this e-commerce plugin have their own forum at https://wordpress.org/support/plugin/woocommerce.

Filter by
Sorted by
Tagged with
0
votes
1answer
35 views

How to Sort Products by “Featured” first?

I would like the default sort method of my product archives to display all the featured products first, and then display all the other products as normal. I'm not sure if there is a hook for this or ...
0
votes
0answers
11 views

Intercept Woocommerce Subscription payment

We are using Woocommerce and Woocommerce Subscriptions plugins in Wordpress. We have a custom meta key/value on the subscriptions, and we need to check this value during the renewal process. If the ...
0
votes
1answer
35 views

Woocommerce - if selected attribute term equals

I have created an attribute "color" with two terms "black" and "white" and i want to show something when selected term equals to white. I've tried the following code (based on https://stackoverflow....
0
votes
1answer
26 views

WooCommerce my-account custom payment method is empty

I'm developing a custom WooCommerce payment gateway plugin. However, I'm having one issue in the http://website/my-account page. The registered token payment methods is not listing properly all data ...
0
votes
1answer
52 views

WooCommerce - Add Custom Field to Shipping Method?

I've created a custom shipping method "Bill to Requester" for WooCommerce. What I'd like to have happen is that when "Bill to Requester" is selected, the customer is given a field to enter some text. ...
1
vote
1answer
25 views

WooCommerce Cart - Group Products By Category

I am trying to group my products in the woocommerce cart by category so that it display as Category 1 - Product 1, Product 2. Category 2 - Product 1, Product 2 etc The loop in cart.php pulls ...
0
votes
1answer
13 views

split 1 cart item into instock and back ordered

If I have a stock count of 2 and I allow backorders and a client adds a quantity of 5 to the cart, the cart shows 1 line item with a quantity of 5 on backorder. Is there a way to split this cart ...
0
votes
1answer
43 views

Allow only 1 quantity of particular product in cart WooCommerce

I have one variable product X that product has two variations, Variations A and Variations B. If a customer added variation A in cart then I want to block the customer to add variations B in cart. At ...
0
votes
0answers
17 views

How to hide some shipping options when any valid coupon is applied in woocommmerce cart?

function add_extra_discount( $cart ) { ?> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function(){ ...
0
votes
0answers
32 views

AJAX content that only appears while the customizer is open

While this is likely specifically a WooCommerce issue, it still applies here. I am using the AJAX add-to-cart feature, so, upon clicking "add to cart," items should be added to the cart (this part ...
0
votes
0answers
18 views

Woocommerce Multiple prices per product based on City

The problem I am facing is that I need to implement multiple prices per product based on city selection. The website is using Wordpress and Woocommerce. I need each product to have a different price ...
0
votes
0answers
16 views

Problems adding a new field to product in cart

I have a problem and it is that I need to add a new field in the product form, and that I can obtain it in the cart page and also in the checkout. After trying it on my own, I decided to googling a ...
0
votes
0answers
16 views

Add a WooCommerce Product Variant with attributes programmatically

I am creating a custom import script (say from a CRM system) and I need to create products and product variations. I have been unable to find any recent snippets about how to do this in the most ...
0
votes
0answers
21 views

Show related products only for primary category

I have found this snippet for showing related products from the primary category. // Alter related products query to pull items from Yoast Primary Category add_filter( '...
0
votes
0answers
14 views

Show all best selling products using FacetWP

I am using FacetWP plugin in my Woo Commerce shop page. In WooCommerce we can show the best selling products by using the shortcode [best_selling_products]. Using the FacetWP, how can we show the same ...
0
votes
0answers
69 views

Query product's image path by category WooCommerce database?

I am writing a small query to grab image path and object ID from Woo_Commerce database. I am join taxonomy and relationship table to achieve this but somehow I am making mistake I can't realize. I ...
0
votes
1answer
13 views

How can I get a get a list of customers from a list of email addresses?

I would like to get the order history for 25k customers. I have each of the customer's email address. My current pipeline is to loop through the email addresses, get the corresponding customer, then ...
0
votes
0answers
20 views

WooCommerce - Remove automaticly added membership product if user remove regular product from cart

I managed to add a product if a user is the first buyer. But when what I want to achieve is when a user deletes that product, automatically gift or membership product will be deleted. I was using ...
0
votes
2answers
32 views

Is there a reason to put a product in both the Child and Parent Categories?

I have a few product Parent Categories with Child Categories. Is there a difference if I place the products in both the Child and Parent Categories, or if I just place it in the Child Category? In ...
0
votes
0answers
60 views

Is it possible to add Term Meta Fields to a WooCommerce Attribute?

Is it possible to add Term Meta Fields to a WooCommerce Attribute? I know I can do this with regular categories, but I'm wondering if there is a way to do this with product attributes. (without a ...
0
votes
1answer
47 views

Woocommerce: Search by custom attribute

I have created an attribute for products which is named: code. But default wordpress search functionality doesn't search code in front end. How I can modify it in order to include code in search ?
0
votes
0answers
14 views

Advanced analytics tools for WooCommerce?

Premise This question might seem out of topic but in my opinion it's strictly related to the whole Wordpress / WooCommerce ecosystem and its performance optimization. Problem The issue is about ...
0
votes
1answer
42 views

I want to run a script only once on a 'thank you' page

I'm wondering what the standard way is to avoid executing some code when a user refreshes the page. We have a unique ID (order number) so we can keep it server side, there's no need to set a cookie. ...
-2
votes
1answer
32 views

Create a Wordpress Database query to find users who purchased specific product through WooCommerce [closed]

I am working with a company that provides online content in the form of semesters you pay to access. The semester is set up like a product that you purchase through WooCommerce. We've been applying a ...
0
votes
0answers
29 views

Woocommerce change the shipping method on the checkout page?

On my checkout page, I'm using Loqate to lookup an address and here in the UK I am able to retrieve whether this is residential or business. My intention is to change the shipping rate based on this. ...
0
votes
0answers
13 views

Woocommerce Product don't return custom taxosonomy when using REST api

I created a custom taxonomy for woocommerece product. It's working fine in wordpress. but when I try to fetch it through REST (Javascript), it's missing. All other properties are returning but not ...
1
vote
1answer
27 views

Set download limit and expiry for WooCommerce downloadable products in specific categories

I have the following code that set a global download limit and expiry, for all WooCommerce downloadable products: //FOR VARIATION DOWNLOADABLE PRODUCTS // set 3 downloads for all variation ...
0
votes
0answers
12 views

Exclude specific product tags from related products in WooCommerce 3.7.0

I use the following command line to exclude specific tags products from related WooCommerce products: add_filter( 'woocommerce_get_related_product_tag_terms', 'remove_related_tags1' ); function ...
0
votes
1answer
29 views

Change Woo Custom Endpoint Titles from a Plugin

I've created some custom endpoints which are working well. Im having real issues trying to update the endpoint page titles, Ive search a lot of examples online and nothing seems to be working. Here ...
0
votes
1answer
50 views

Woocommerce modifying the html on the checkout page?

I'm trying to wrap 'some' of the fields of the checkout page in a div and inject some buttons because I am implementing some address validation. Basically to start with I need a wrapper around ...
-1
votes
1answer
24 views

Woocommerce: block user removing cart item

I've been tasked with creating the most awkward buying process my client could possibly come up with. When buying a product, the customer proceeds to a multi-step process where they build up a ...
-1
votes
1answer
14 views

Turning Existing Eccommerce Site into Multi-SIte

I have an existing multi-site that is a pretty in-depth e-commerce (woo) site with lots of features (free-shipping, discounts, memberships.) I need to create a sub-brand for an existing product, ...
0
votes
0answers
11 views

Trying to Set Shipping and Billing Details on Form on Order-Pay Page

I'm trying to set Billing and Shipping Details for a WooCommerce order using a form on the order-pay page rather than the original checkout page I need the billing and shipping details to be set from ...
0
votes
0answers
20 views

Help when displaying a link in the Woocommerce order table

I am developing a module for woocommerce that consumes an API, in the back it shows the link correctly of each order that is made, but my problem is when I want to insert this link in the part that ...
0
votes
0answers
19 views

WordPress or WooCommerce hook when order is made, using Bank Transfer as payment

I was wondering if there is a hook I could use to trigger one function in the moment an order is placed, but only if the order is made with payment by Bank Transfer. For the online PayPal payments I ...
0
votes
0answers
16 views

set up existent product blocked in woocommerce

I'm not able to change the product type (nor the product data) into virtual as it looks its noneditable, like blocked
-1
votes
2answers
28 views

Setting WooCommerce currency programmatically

I have an issue where I need to change the currency programmatically. I am doing an AJAX call and I have noticed that returned results does not take into account which currency the user has set. So I ...
0
votes
0answers
18 views

HTTP 500 error when all products in category are out of stock

I have manually edited a WordPress WooCommerce hook which hides all out of stock products. The problem is when all products in category are marked as out of stock, I get HTTP 500 error. How can I ...
0
votes
1answer
13 views

Pseudo class :before don't working in a specific button

Currently, i'm building an ecommerce and a small button was running with pseudo class :before suddenly stopped working.The site run WP with Divi and Woocomerce. I wish the bellow code back to run: ....
1
vote
0answers
17 views

When Free shipping is available hide other shipping methods except Local pickup in WooCommerce 3.7 [duplicate]

Using "When Free shipping is available hide other shipping methods except Local pickup in WooCommerce" answer code, I would like to show Local pickup and free shipping when free shipping is available (...
0
votes
0answers
16 views

woocommerce remove last sub category from product url

I am working on migration site. after migrating i am trying to make url look same as live site This is current url: https://photoland2.etrafficgroup.com.au/frames-and-albums/frames/wooden-frames/106-...
0
votes
0answers
31 views

pagination woocommerce i can´t do it

hello i trying to do pagination with php and woocommerce and wordpress this is my nav pagination <div class="nav-links"> <a class="next page-numbers" href='<?php //...
0
votes
0answers
30 views

REST API - Cart shipping methods with label and rates

I am developing mobile application from my woocommerce store. I am able to add product to cart but I am not able to count shipping methods for that cart. Whenever I retrieve shipping methods it ...
0
votes
0answers
47 views

Order Woocommerce Products by On Sale and Alphabetically

I'm trying to order products by on sale first and regular priced products second. Both have to be sorted alphabetically in ascending order. On the website the on sale products are first but they are ...
0
votes
0answers
93 views

AJAX to add to cart multiple products woocommerce

I found some AJAX on here to add a product to cart through WC through a button click, and I am trying to modify it to be able to add multiple products with the single click. I am not super familiar ...
0
votes
1answer
40 views

How to speed up “My Account > Orders Page” on Site with More than 200,000 orders?

On my account>orders page, the slowest query is the following: SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE 1=1 AND ( ( ( ...
0
votes
1answer
39 views

Custom product loop avoiding duplicates

I am trying to create a product loop based on an attribute value from (pa_product-series). many products can have the same value, but I only want to return one from each...avoiding multiple products ...
0
votes
0answers
28 views

Is it possible to echo a woocommerce prouct attribute discription?

Rather than displaying the attribute name I would like to display it's description. Is this possible? function woo_specifications_product_tab_content() { // The new tab content global $product; ...
0
votes
0answers
28 views

Woocommerce - Remove cart button depending product (post) status

I created (copied) a custom post status for my old/discontinued product in my function.php and everything is working fine. Now, I want to make those old product unpurchasable by removing the cart ...
0
votes
0answers
21 views

Append text to a class in wordpress

I am trying to append a custom text to a wordpress class. For example there is a class "payment_method_klarna_payments_pay_later" for klarna payments (in woocommerce checkout page) and I would like to ...