Questions tagged [woocommerce]

WooCommerce is an open source eCommerce plugin available for WordPress. Questions should relate to programming which changes or extends WooCommerce behaviour.

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

Send custom e-mail after X days WooCommerce order

I am trying to create a function that should send a custom E-mail if a "processing order" is older than five days. I am a bit stuck on my code. It doesn't seem to work - nothing is happening. I am ...
0
votes
0answers
13 views

Howto bypass checkout page completely and go straight to “place order”

I would like to completely bypass the checkout page and go straight to "place order", which then redirects the customer to payment. I do not need to capture any billing details, and there is only 1 ...
1
vote
1answer
26 views

Show WooCommerce products only to multiple authorized user roles

I'm trying to adapt "Completely hide products from unauthorized users in WooCommerce" answer code to also allow several custom user roles to view this products. I believe the best way to accomplish ...
2
votes
2answers
27 views

Add conditionally a custom checkout field to shipping section in WooCommerce

I have certain Woocommerce products that require the customer (or the product recipient) to provide a date of birth. Customers are required to provide date of birth when creating an account to check ...
-1
votes
1answer
23 views

How send custom fields values to a custom email in WooCommerce? [on hold]

I inserted two checkboxes in the cart (mysite.com/cart) of my site with woocommerce, I need to send by email the option selected between these 2 checkboxes once the purchase is concluded. How get the ...
1
vote
0answers
17 views

How do I properly test a wordpress Cron job?

Simple Abandoned Cart https://github.com/gregbast1994/msp-abandoned-cart This plugin simply skims emails at checkout and saves the cart session data. Then we set a cron job to check if the session ...
-2
votes
0answers
13 views

Woocommerce product variation

I am working with Woocommerce web app and I want to show different variations in product page but only default variation is showing. Any suggestion?
-2
votes
1answer
28 views

My Theme is responsive but my description is not mobile friendly why?

I have my whole site responsive but the data i have copied from the vendor site is not responsive i dont know why i have now copied 200 products and not willing to delete and do the work again. Can ...
-1
votes
0answers
21 views

Is there a way for make rules to limit users in a specific time in woocommerce? [on hold]

I'm setting up a new woocommerce shop, i need to set a limit on s users by the ID card number in some categories. for example, every user/phone number can buy 2 products every week in category_1 and ...
1
vote
1answer
20 views

Rearranging and customizing woocommerce checkout fields

I need to modify the default woocommerce billing&shipping fields. I need to move some of them, set a different form-row-class and add a placeholder while removing the labels. My code is working ...
-1
votes
0answers
23 views

Move stars before rating text on single product page

Currently on the single product page, the rating text is displayed first and then the stars. I would like to swap them. I have tried to look for the code that displays the stars but without success. ...
1
vote
1answer
33 views

WC() is giving empty results in WooCommerce 3.7

Call to WC() is not returning required values in WC()->customer giving empty results. The sample code I am using is: $customer = new WC_Customer( $customer_id ); $country = $customer->...
-1
votes
0answers
6 views

How to add Subscription plan for a product in woocommerce for free [on hold]

I am trying to sell a magazine as a subscription for 1month, 6 months, 1 year on Wordpress e-commerce website. But woocommerce subscription is costly. Woocommerce subscription
2
votes
1answer
25 views

Hide add to cart button when product visibility is hidden in WooCommerce

Every night I load in a CSV with my suppliers products. They remove and add products in every CSV. If a product is not in the CSV anymore and it was in the CSV before, my plugin will put the product ...
1
vote
2answers
24 views

Show payment gateway only if product has particular product categry

In my wooocommerce store I want to restrict and show payment gateway(cheque) only if the product has particular product category with the category ID "266". Now I have this snippet but it does the ...
0
votes
0answers
13 views

How to connect to WooCommerce from as3

Im migrating from Magento store to WooCommerce. I have used my own Flex application to syncronize our accounting with a store (orders, products, categories etc) via Magento API. Im not able to find ...
0
votes
0answers
10 views

Woocommerce - all new sign-ups need to get added to the mailchimp list but tagged as ‘eCommerce’

Woocommerce - all new sign-ups need to get added to the mail-chimp list but tagged as ‘eCommerce’ I have googled and found the hook "mc4wp_integration_data" WordPress Core mc4wp integration data ...
-1
votes
0answers
12 views

Woocommerce causing High CPU Load Averages every 3 to 4 days causing the website to go down

Are there any performance settings that can tune the WooCommerce to consume moderate resources? We are using a CentOS t2.large instance from AWS only for WooCommerce but still CPU load averages cross ...
0
votes
1answer
21 views

Display Product Price next to Product Title on Product Page (next to, not under or above)

After looking at the hooks used, the title has priority 5 and the price has priority 10. So, I did an remove_action and add_action and changed it to 6. That did not work. What I need is this: ...
-1
votes
1answer
26 views

Imported woocommerce products are not showing up on wp-admin

I have imported about 79 products into woocommerce using a csv file. The import was successful but despite it shows in wp-admin that I have 90 products (11 were already there) I can only see the ones ...
1
vote
1answer
32 views

Display a checkbox that add a fee in Woocommerce checkout page

In Woocommerce checkout page, I'am trying to add a check box on checkout page I have referred to these articles woocommerce custom checkout field to add fee to order ajax Checkbox field that add / ...
2
votes
1answer
34 views

How to get email recipients from new order email in WooCommerce

I would like to get the recipients field value from WooCommerce emails settings for "New Order" email as shown below: How to get Recipient(s) field? Any help is appreciated.
0
votes
0answers
14 views

Woocommerce subscription : duplicate order on renewal after payment failed [on hold]

I have a problem on my ecommerce website. Some subscription renewal does not work properly during a failed payment. Here is what's happening : Customer subscribe. A subscription was created. Ex : ...
0
votes
0answers
35 views

How to add new columns in WooCommerce review order table?

I need to add new columns in WooCommerce checkout order review table. I want the table to have Product column, Price column, Quantity column and Total column. I copied file review-order.php into my ...
0
votes
1answer
15 views

Add a product to cart through api call

I have set up the wordpress REST api to create an endpoint listening to calls by a specific third party service. This third party service will send a POST request containing the product data. This ...
0
votes
0answers
13 views

Add custom field to WooCommerce product listing [on hold]

I am using Wordpress 5.2 with Woocommerce plugin, and I would like to add one custom field in add new product Section (WpAdmin), that field should be optional (value may be 1 or null). This custom ...
-2
votes
0answers
12 views

How can I add percentage filter in woocommerce shop page?

I want to add a product filter option on the shop page. Example : Product A regular price = 15900 sales price = 12720 so here a 20% discount. I want a percentage-wise filter-like below. 20% - 40%...
-2
votes
0answers
13 views

How do I conditionally change the “Checkout” button in the shopping cart

I need a specific functionality. I need the Cart "Checkout Button" to change to "Request a quote" IF the cart contains a specific item/event, regardless of the rest of the cart. The event is –> a ...
1
vote
0answers
16 views

Woocommerce reset_variations link not resetting after I converted drop-downs to radio buttons

I used the code below to convert my Woocommerce variations into radio buttons and style them up how I needed. However, the "clear" button with the class of reset_variations doesn't actually reset the ...
0
votes
0answers
32 views

SQL query to delete all the products except virtual

Woocommerce CSV importer doesn't allow more than update existing products by ID or REF, so I have to delete all the products everytime the stock is updated. My question is: How to delete all the ...
0
votes
0answers
13 views

Prevent pending to on-hold email in Woocommerce from sending only for certain payment options

In Woocommerce i would like to stop the on-hold email from beeing sent to the customer only for a certain payment option. What i have so far is this, which would remove this email for all orders. ...
0
votes
0answers
13 views

How to display the price depending on the quantity on the product page

How to update price automatically when quantity changed on product page in Woocommerce? After click on plus or minus button is quantity changing but price is still only pro one item. It's possible ...
0
votes
0answers
15 views

Woommerce - Adding empty categories and parent cats to body class

I am building a Woocommerce website. I have added the below 2 functions to my functions.php file (I found these both online). These functions have added both ‘categories’ and ‘parent categories’ to ...
1
vote
0answers
16 views

WooCommerce - calculate shipping per line item when quantity is split

I am splitting up cart quantities in to blocks of 6, ie. if a customer adds 8 into the cart, it is added to the cart as 2 rows, the first with 6 and the second with 2 as the quantity. The reason for ...
-1
votes
1answer
19 views

Is it possible to write a script that automatically changes product categories for a specific product in WooCommerce based on day of the week? [on hold]

I need a script that can remove and add categories for specific products based on the day of the week. Currently, I'm using categories corresponding to all weekdays, so my customers can filter ...
-1
votes
0answers
13 views

Woocommerce product Listing by attritube group

I want to display a group of products with the same size, first all products with size 30, then 40, then 50... SIZE : 30 Product 5 Product 6 Product 9 Size 40 Product 2 Product 4 Product 8 ---------...
-1
votes
1answer
12 views

Any way to stop woocommerce API creating duplicate images?

I’m using wordpress 5.2.2 with Woocommerce 3.7.0 We’re using the standard Woocommerce API to fill up our webshop with products from our ERP software. But we are having some issues with the images. ...
0
votes
1answer
10 views

I need to set sitewide download limits per user, to be reset each month

I've got a WordPress membership site using WooCommerce and WooCommerce Membership plugins. The site is used to download resources for schools. I need to set it so that a user can download a maximum ...
-1
votes
1answer
28 views

How to get the last order of a customer in Woocommerce

I am using "How can I get the latest order id in Woocommerce" answer code that returns last order with a custom function get_last_order_id(). Here is my code attempt where I get order items: <?...
-3
votes
0answers
10 views

How to auto map all csv fields to products [on hold]

I am trying to import products in bulk from a supplier, but only 34 out of 2000 are imported. Basically before import I am told to map csv fields, which I try, but some seem to be missing.... This is ...
0
votes
0answers
7 views

WooCommerce: Round Up Shipping Weights in Cart / Checkout

This is actually based on a previous SO post from two years ago (Woocomerce round up weight on cart and checkout) but it doesn't seem to work anymore in WooCommerce 3.7. To explain what I'm trying to ...
1
vote
2answers
25 views

Unset some data from create_order( $data ) inside WooCommerce

Im trying to clean up some default database entries that WooCommerce adds to the postmeta table. The two primary entries that I do not need are _customers_ip_address & _customer_user_agent. I ...
1
vote
0answers
25 views

Adjusting Bundle Product Price Programmatically

I’m working on a small tool for my client that dynamically updates quantity of items needed for certain project sizes (in square feet). The entire page is built using jQuery. I managed to update all ...
-2
votes
0answers
10 views

Change “Checkout” button when an event is triggered

I need a conditional checkout with the following behavior/functionality: I need the Cart "Checkout Button" to change to "Request a quote" IF the cart contains a specific item/event, regardless of the ...
1
vote
0answers
22 views

Woo-commerce Booking - Fetch all available bookings based on Time Range

I'm trying to fetch bookings based on time availability in wocommerce bookings by passing the time selection in below format: 2019-08-26 08:00 - 2019-08-26 11:00 $available_blocks = $...
0
votes
1answer
25 views

Loading woocommerce images from sub-domain

Trying to optimize a wordpress site. When a browser requests static images, it sends cookies with the request from the main domain, but the server ignores the cookies. These cookies are unnecessary ...
0
votes
0answers
15 views

How to add a custom field as metadata when creating a customer with woocommerce api

To begin with, I have a field in my model called afm. I find difficulty in posting among with other fields, the value of this field during the procedure of creating a customer. The procedure of ...
1
vote
1answer
18 views

Adding logo to shipping rates on checkout - WooCommerce

I am trying to add a little FedEx logo in front of shipping rates returned during checkout. I am able to log the text of the labels for shipping rates using below, but the image isn't being added. ...
0
votes
0answers
43 views

How to finalize AJAX call after Add to Cart-click

I have a shop with variable products where I want to do the following when the Add to Cart-button is clicked: Start an AJAX call to save a jpg-image (thumbnail) of a div visible on the single product ...
-1
votes
1answer
19 views

I want to add a tag display to the product list displayed with the woocommerce shortcode [on hold]

I want to add a tag display under the title of the product list displayed with the woocommerce shortcode, but I do not know the web hook of the product list, and how to write the code as adding a ...