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.

1,547 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
1k views

How to pass/get data to/from the WooCommerce data-product_variations object?

What is the best way to pass/get data to/from the data-product_variations attr form in Product Single pages. I am working on some interactions with the product gallery images and the product ...
3
votes
0answers
3k views

Add attribute / custom attribute to product in woocommerce

I have products from some API and want to insert these products. I was able to insert products and use already existing attributes ( or added by UI ). Adding new term (My Color) to the existing ...
2
votes
0answers
25 views

Rewriting Woocommerce Product Filters To URL Segments

I'm working with a site where product category pages are filtered using query parameters: ?color=red&brand=nike&size=10 I'd like to use URL segments instead and rewrite the request to the ...
2
votes
0answers
24 views

Woocommerce - Move product without price a the end

I search to split my woocommerce product loop in two part first product with price and after product without price. How can i achieve that with a pre_get_post without order product by price (I want to ...
2
votes
1answer
196 views

How to disable Woocommerce password recovery and use the default WordPress password reset page?

On my website: https://sciencehook.com/ when I request for password reset, it is redirecting to Woocommerce's reset page: https://sciencehook.com/my-account/lost-password, but I want default WordPress ...
2
votes
0answers
69 views

WooCommerce Subscriptions: Show monthly Price for annual Product

Using WooCommerce Subscriptions, is there a way to show a monthly price as well as a "total duration" price? On my site I have subscriptions for a month and others for a year. Those for a year look ...
2
votes
0answers
356 views

Override woocommerce wc-class function

I'm not good in WP and plugins and will need some help here. I've read that is possible to alter some WC core function with filters and action but probably I didn't understand this correctly. I want ...
2
votes
0answers
289 views

Woocommerce query specific product from specific category

I'm trying to create a shortcode that will show a woocommerce product via just a shortcode. I want the shortcode to take 1 parameter that is either the ID or slug of the actual product. Preferably ...
2
votes
1answer
117 views

Woocommerce and different checkout field for different countries

I am considering to migrate from Magento to Woocommerce. My main site is for Japan, and the other is in English. I read you can go for either WPML or multisite. I understood WPML can handle multi ...
2
votes
2answers
2k views

Search results don't show products

my website is a woocommerce site and it has blog posts and some pages. My problem is the search box. Everytime I searched it only shows the posts and pages results. It is not showing woocommerce ...
2
votes
1answer
200 views

Hide some items from Screen options in dashboard for products

I am trying to unset/hide some options in dashboard. I am trying it for products screen. Here is the screenshot Here is the code i tried to hide SKU /** Hide Dashboard widget by default via Screen ...
2
votes
1answer
2k views

Woocommerce add to simple product attribute programmatically

i want to create a function which will add to specific products an attribute programmatically. i use the below code but it doesnt seem to work. $attributedata = Array( 'pa_color'=>Array( ...
2
votes
1answer
3k views

Woocommerce auto cancel On-Hold after X days

I have searched high and low but with no resolve. So we developed a custom "bacs" type gateway for our site. Here in Brazil you can pay via a bank billet. The billet usually has an expiration date for ...
2
votes
1answer
2k views

Display related products with custom output

I'm trying to display the related products with my custom html output, unfortunately i'm kind of lost on how to do this. The WP_Query below displays the products that are in stock, what i want is to ...
2
votes
0answers
1k views

Create WooCommerce custom stock option that is non-purchasable

I've been able to add a new stock option (Call for Availability) in the admin of WP for Woo and it successfully shows on the front-end of the site as well with the following code (using this as my ...
2
votes
1answer
1k views

WooCommerce add_to_cart url not working

I created a custom button to add products to cart and I'm using this link: http://signaturecarbone.s23528.liner7.atester.fr/panier?add_to_cart=91&product_id=91&variation_id=93&...
2
votes
0answers
51 views

How to automatically add and show all the product attributes when creating a new product

I'm probably gonna be yelled at for this one. I have gone through some posts here, which seem to be the same issue (or almost on the same lines), But I didn't get anything out of them. Since, some are ...
2
votes
1answer
2k views

creating product with variations using woocommerce REST API

I've created a product with variations but they are not linked at the back end and won't show up on the product page unless i manually set them $data = [ 'title'=> 'ship your idea5', 'type' => ...
2
votes
1answer
283 views

How To add custom radio boxes to WooCommerce Billing page and change total price by this field?

Lets say i need to add custom radio fields ( company or person ) at the top of the form to the billing for. And if the visitor checks person they should pay 21% Tax and they select company that is ...
2
votes
0answers
1k views

WooCommerce: update custom fields after checkout validation failure

In my project I'm customizing some of the WooCommerce features. My "shipping methods" are: 1. delivery 2. take away I also added a custom field in the checkout page that is a <select> populated ...
2
votes
1answer
37 views

Adding extra one email address who receives email as admin - woocommerce

Is there any way for Adding extra one email address who receives email as admin.There are many ways I found but that sends cuatomar mail...but I need to send like a mail admin receives.This extral ...
2
votes
1answer
85 views

How to build wordpress site which will have location based services & products?

Even though I could use woocommerce for services & products, how to add location to them? I want users to select their location first, then only products & services will be shown.
2
votes
0answers
407 views

Woocommerce cart is a non-object inside `admin_post` action

I'm writing a custom integration plugin for Woocommerce, to add a dynamic product to the cart. Right now, without the plugin, I make POST request via a form inside an external page containing the ...
2
votes
1answer
634 views

woocommerce featured products and categories

I am working with woocommerce at the minute, and the design requires to show a number of featured products and categories in a number of different styles. For example one featured product needs to ...
2
votes
2answers
84 views

Enabling autosave when plugin disabled

I found that Woocommerce is disabling autosave, maybe for good reason, but I'd like to have it turned on and see if it presents an issue. This is what I found in the __construct in their post type ...
2
votes
0answers
645 views

woocommerce target button with class after ajax update

I'm working on a eshop using woocommerce. I have an add to cart button with class "single_add_to_cart_button", and a variations select list with 3 sizes. When I select a size which is unavailable, ...
2
votes
0answers
626 views

Trigger Woocommerce New User Email

I wrote a custom plugin that handles login and registration for my WordPress Woocommerce site. When a user registers via my custom form handler I would like to trigger Woocommerce to send the new ...
2
votes
0answers
1k views

Add a custom field to top attribute in WooCommerce

i kinda went crazy trying to solve this. I need to add a custom select field (and save it) to WooCommerce Attributes edit / insert new page - in each top level attribute - not the sub "terms"... ...
2
votes
1answer
926 views

Can two products with the same name but different category produce unique URLs?

In the permalinks settings I have /courses/%product_cat%. Using WooCommerce I created two different Courses that are named "English", but they have different categories that end up making my urls look ...
2
votes
0answers
2k views

new WC_Order(); Coming Back Empty

I'm trying to use new WC_Order( $order_id ); to pull in info from orders to send to an API and the call comes back empty. I have also tried using wc_get_order( $order_id ); and I have confirmed that ...
2
votes
1answer
36 views

How to change page via login as user and admin

I am using WordPress and I'm trying to develop eCommerce website using WooCommerce. When a user logs in I want to show the following in the menu-bar: Product Category Users profile Orders Cart Then,...
2
votes
1answer
294 views

Woocomerce language

I have no idea why woocomerce is not changing language. When I change language in wordpress everything is fine, but woocommerce language is not changing, but only in my language (Lithuanian lt_LT), in ...
2
votes
1answer
416 views

update default search function and get postmeta entries

I want to get post meta entries in woocommerce. When user search anything from default search bar. Data should be also returned from post meta table. So basically I need to modify the default ...
2
votes
4answers
2k views

WooCommerce 'all' orders no longer being displayed - how may I debug/fix

I've just noticed that we seem to have a bug with our store. The 'all' orders selection is showing as empty but the other sub catergories such as completed, on hold and pending etc are there. I'm ...
1
vote
0answers
17 views

Keep getting Notice: Trying to get property of non-object in …\wp-includes\post.php on line 4153 when generating woocommerce coupon

I'm getting this error, that I can't get rid of. Here is my code: function generate_coupon($coupon_name){ global $post; $coupon_code = $coupon_name; // Code $amount = '10'; // Amount $...
1
vote
0answers
27 views

how do I remove the shipping from woocommerce thankyou page and from the email

I've been trying to remove the shipping completely from my woocommerce website. I was able to remove it only from the checkout page and the cart page BUT I want to remove also from the thank you page ...
1
vote
0answers
30 views

Woocommerce custom endpoints

Currently, I'm an android developer(Java) and trying to add some custom endpoints to my Woocommerce site. I've wasted so much time to understand concepts of WP, but still can't get clear answer. So ...
1
vote
1answer
17 views

Sorting category products not working

I am using Avada theme and the sorting of the products on category page is not working. When i click on ascending and descending order the ordering of the products becomes random. Please provide me ...
1
vote
0answers
15 views

Importing Woocommerce products with variations

I need a plugin or script which will help me import woo commerce products along with variations and respective prices,descriptions and quantities. Is it possible to use a simple plugin or a ...
1
vote
0answers
34 views

How to delete 1000s of duplicated images in Wordpress?

We kinda have a wired problem that took me weeks of searching and testing, the problem is that while working on one of my client's Wordpress website I noticed that there are around 75k images in ...
1
vote
1answer
27 views

Some images aren't shown on wordpress after installation on host

So I created a website on localhost with Xampp (been doing it multiple times). This time, right after I uploaded the files to namecheap host, some images aren't shown. The slider image isn't, some of ...
1
vote
1answer
16 views

how to show store name when I add a product on cart in woocommerce(woocommerce multi store)?

I m using "OST Multiple Store" in my Woocommerce website. Now when I add a product in my cart its working fine but as it is a multi store I want to show store name as well into my cart. Here is my ...
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 ...
1
vote
1answer
18 views

How to toggle between two custom fields in WordPress woocommerce 'WC Product Field Group' plugin?

I have a full suit tailoring WordPress website and it using woocommerce plugin. I need 2 custom field groups to show in single-product page. Custom Measurements (Precise) In this method the client ...
1
vote
2answers
76 views

Display related products based on 2 specific product attributes values in WooCommerce

I am looking for solution to display related product by multiple product attributes. I've tried "Display Related products for a specific product attribute value in single product pages " StackOverFlow ...
1
vote
0answers
8 views

Woo-commerce Checkout Summarized in Pop-up Card Entry Only

Site URL: https://pamperingbear.org Hi there, thanks for stopping in! I am working on a project for a non-profit, donating my time and efforts, yet still want to deliver the best solution possible, ...
1
vote
0answers
23 views

Woocommerce REST API - updating an order changes custom tax calculations

We have a online woocommerce store that processes two types of orders: shipping and instore pickup. Shipping calculates taxes based on billing address and instore uses the store address (zip). ...
1
vote
0answers
26 views

Updating Woocommerce Settings API when Wordpress Settings API saved and vise versa

Working on a woocommerce gateway and i am trying to make it in such a way that when users saved changes on the woocommerce payment gateway settings page, some values are updated in the admin setting ...
1
vote
2answers
134 views

Set a specific default stock quantity on all WooCommerce new products

Context: I'm making a WooCommerce/Dokan marketplace for people to sell second hand products. As this are second hand products each product should have an inventory of just 1. All products are simple ...
1
vote
0answers
57 views

custom payment gateway in woocommerce failed to connect to remote api server

its my first time to create wordpress plugin, my task is to create a payment gateway i study this sample and also did some code on php using cURL here is the code. and it works. now on wordpress when ...