Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [woocommerce]

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

2
votes
0answers
127 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
112 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
0answers
1k 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
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
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
394 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
899 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
0answers
746 views

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

Wondering if I could get some pointers on how 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 ...
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 ...
1
vote
0answers
17 views

How to extend WooCommerce API to show bookable product availability rules?

I've made a custom plugin with a custom API end point. I would like to access my bookable products availability times so I can use the API with a react front end. So far I have this function that ...
1
vote
0answers
18 views

Improve WooCommerce checkout process

Woocommerce is setup to only ask for first name and email address. They need to create an account. When someone already has an account and tries to order for a second time, they need to log in first. ...
1
vote
0answers
16 views

Send billing info from woocommerce checkout page to paypal checkout form

I have a theme using Woocommerce and PayPal Checkout. The checkout page in my theme has a form to input Billing Address info. My only method of payment is via PayPal Checkout. If a user starts the ...
1
vote
0answers
9 views

How to search Woo Commerce products with punctuation in title?

How do I modify the default WooCommerce Product search so that products with punctuation in the title can be found without including the punctuation in the query? For example, if I have a product ...
1
vote
0answers
150 views

Add custom CSS class to product images

I would like to add a custom CSS when displaying product images. E.g. when calling the woocommerce_get_product_thumbnail function. I've tried solutions like this: Add CSS class to every image but ...
1
vote
0answers
35 views

Automatically making a newly saved payment method default in WooCommerce

I've been trying to find an appropriate action(s) hook to do what I'm describing in my title. Under My account > payment methods I want any newly saved payment method by the user to be set as default ...
1
vote
0answers
39 views

Can't create term for product attribute

Please help. I need to create product attribute term after I create a product attribute taxonomy. wc_create_attribute([ 'name' => 'Size', 'slug' => 'size' ]); // This will only work If I ...
1
vote
0answers
46 views

WooCommerce product category permalinks

Is there any way to set WooCommerce product category without category-base word(s)? Current category url, www.example.com/product-category/t-shirt. But, I need to set category url like this one, www....
1
vote
0answers
96 views

WooCommerce: Add New Report Tab

I have a project for a school. The seats in the class are sold as variable WooCommerce products and student info is captured at checkout. I want to put a new tab in the Reports section of ...
1
vote
0answers
322 views

WooCommerce: How can I get orders with a custom ID in order meta data object?

Because of a project I need help from you. I've searched a lot but I can't find a solution. I'm trying to edit a WooCommerce function named woocommerce_account_orders I've added the field ...
1
vote
0answers
70 views

Change Product Addon price based on select Variation

I am running WooCommerce and WooCommerce Product Add-ons. Is there a way on a Variable product to have the price of an addon be different based on the selected Variation? Example: Three Size ...
1
vote
0answers
521 views

WooCommerce update_shipping_method ajax call wipes shipping method set on non-checkout page

Backgorund I created a custom minicart with a shipping calculator with country select, postcode input and shipping method selection. The purpose is to show product subtotal, shipping method and ...
1
vote
0answers
32 views

WooCommerce - Maximum qty per line per product

I have a WordPress site using Woo-commerce as the shop. We want to be able to set some maximum limits for each product so that if someone wants to order 40 of Product A, but we have set Product A to ...
1
vote
0answers
36 views

Can't show most recent comment on top with wp_list_comments() for WooCommerce reviews

I am trying to break my comments (reviews) on my single product page into various pages, having the latest comments displayed on top of each pages and the latest comments displayed on the first page / ...
1
vote
0answers
216 views

WooCommerce order complete email logic

Can someone helps me to understand the logic of WooCommerce for sending email on a completed order? If I'm not wrong, the mail is send when the order is marked complete, but I'm not able to find the ...
1
vote
0answers
47 views

How to create a dropdown select of all items in an ACF field group

I have a series of Field Groups, each attached to a specific product category (woocommerce) and I need to be able to access ALL the data regarding each field group on the product category page. This ...
1
vote
0answers
31 views

Manage custom post type in woocommerce /my-account/ page

I am hope for your help I have a custom post-type on my site - "Campaigns", I want to make that the user can on the page /my-account/campaigns was able to see the list of his posts, delete / edit ...
1
vote
0answers
397 views

jquery.validation.js is not working in woocommerce checkout page form

jQuery("#woocommerce_checkout_form").validate({ highlight: function(element) { (jQuery(element).parent()).parent().addClass("woocommerce-invalid"); (jQuery(element)....
1
vote
0answers
265 views

How to Change WooCommerce Variable product pricing by SKU or visible children id

I'm trying to Change WooCommerce Variable product pricing by SKU or visible children id. When I see the Variable product information by using this Code : $product = new WC_Product_Variable(49); $...
1
vote
0answers
196 views

Timber, Twig, and Woocommerce: Last product stays in the cart after checkout

I am building a site in timber that uses Woocommerce. Everything is working great, except I can't get products out of the cart. I'm using Woocommerce Product Add-ons, a subscription plugin called ...
1
vote
0answers
25 views

Auto generate user email while registration

Here is the problem we are facing, we have a woocommerce website, most of our customers don't have an email or can't remember their username, so we have to make them do every thing with their phone ...
1
vote
0answers
1k views

Get product variation attribute titles - WooCommerce

Hi there so when I am on a product page and I loop through the variations, I want to list their attributes WITH their titles. I have my code at a point which lists the variations attribute values but ...
1
vote
0answers
94 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 ...
1
vote
0answers
44 views

How to auto refresh when user change postcode

I setup the shipping zones so if the customer is in the local area and enter the correct postcode, "Free local delivery" become active and replace other zones. The problem is the customers is not ...
1
vote
0answers
107 views

Calling & display certain product category loop and pagination on the homepage

Need some help with wordpress and woocommerce functions. OK, the situation is, I have a homepage that use archive-product.php template. It shows latest 28 products per page. This is the product loop ...
1
vote
0answers
308 views

How to overwrite price html in woocommerce single product page

I want to overwrite price html in single product page in woocommerce. I have used the below code but its displaying twice. When click on plus or minus in product details page , the price should be ...
1
vote
0answers
67 views

Refresh admin page after woocommerce order received

I am little bit new to this. I want my admin woocommerce orders page to be loaded or be refreshed after someone placed an order. So, we can see if there is an order. I use woocommerce hooks and java ...
1
vote
0answers
23 views

Categories for each brands

I have searched for hours but could not find an answer to this, or a module to help. We are building a store and our client needs the ability to navigate the store by manufacturer. Is there any way ...
1
vote
0answers
24 views

Function works when I don't login to WordPress but when I login then it doesn't work

In my function I just tried to add fees based on some calculation. It is working when I am not logged in to the site, but I don't really know what makes my function stop when I am logged on the site. ...
1
vote
0answers
27 views

Woo commerce using add_fee to add discount to cart not saving discount amount the admin backend when guest user is shopping

Today I spent full day solving one single problem of not able to display custom discount in the backend order management of woocommerce plugin, I added the discount on cart calling the woocommerce ...
1
vote
0answers
14 views

user password reset e-mail

Background I'm using Woocommerce and Storefront theme I'm creating 100's of users in bulk (potential customer list) Over the coming 6 months I'm ring all those new users and via phone creating ...
1
vote
0answers
356 views

How to auto fetch customer details in Woocommerce in checkout page

I am creating a WooCommerce Plugin so admin can placed an order on behalf of a customer. This plugin is useful for those websites who have regular/recurring customers who placed orders on Phone & ...
1
vote
0answers
17 views

Extending the woocommerce product export functionality

according to: Woocommerce add extra field to variation product I can add additional fields to my variations. The question is, how can I export or import them via the build in importer/exporter. ...
1
vote
0answers
91 views

Shipping Method does not inherit settings from the class

I have a custom shipping method that must start as not enabled when installed. My shipping method class extends WC_Shipping_Method: public function __construct( $instance_id = 0 ) { ... $...
1
vote
0answers
215 views

How to change Attribute Type

I have created an attribute product-pv like below. Using the following code, function proccess_add_attribute($attribute){ global $wpdb; //check_admin_referer( 'woocommerce-add-new_attribute' ); if (...
1
vote
0answers
54 views

Woocommerce Cart Default Language Not Changing

Recently I was successful in changing my clients woocommerce default language to Spanish in the cart section and product section and had no issues. Because I didn't understand Spanish i deleted the ....
1
vote
0answers
359 views

WooCommerce - get product sub categories

In WooCommerce, I'm trying to get just the sub-categories of a specific category I've created, called collections and display them in a WP_Query however I can't seem to get just the categories it's ...
1
vote
0answers
38 views

WooCommerce plugin won't let me access settings

I downloaded WooCommerce and activated it normally. But it doesn't show up in my Wordpress sidebar to access the settings. When I do it from the plugins page it directs to a page that tells me that I ...
1
vote
0answers
206 views

WooCommerce slider filter for numerical attributes

I want to create a filter with 3 sliders: diameter, height and strength like on this page: https://www.supermagnete.de/eng/disc-magnets-neodymium I have these values stored as attributes of products ...
1
vote
0answers
76 views

wordpress (woocommerce) add image to media library programmatically python

So what I am trying to do is to link an image to a product in woocommerce. first the image is downloaded by python script and put in a folder. I've inserted into the DB a post of type attachment ...
1
vote
0answers
376 views

Displaying custom taxonomy on WooCommerce product page

I'm trying to create a WooCommerce bookshop for a client, and need to create a custom taxonomy for the books' authors. I've managed to get the taxonomy working in wp-admin by inserting the following ...