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
57 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
89 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
890 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
151 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
2k 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
371 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
863 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
688 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
8 views

Which naming convention is latest in WooCommerce?

I'm creating a Woocommerce theme and the classname naming in WooCommerce make me confused. for example: <div class="woocommerce-message woocommerce-message--info woocommerce-Message woocommerce-...
1
vote
0answers
14 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
8 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
47 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
31 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
15 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
33 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
43 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
358 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
72 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
33 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
30 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
293 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
127 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
170 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
50 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
29 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
78 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
247 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
43 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
19 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
21 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
18 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
13 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
274 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
15 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
71 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
120 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
53 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
280 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
59 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
342 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 ...
1
vote
0answers
59 views

Correct function to get the user's latest Woocommerce Subscription?

I've a members' only subscription site, where the member can only have one active subscription, and I need to be able to get the status of the subscription. I've been through all the documentation ...
1
vote
0answers
173 views

When sale price is 0.00 show only regular price

I run my woocomerce product updates via excel sheet uploads with over 10,000 products. However, with the sale price/promo price column, I have prices of 0.00, 0 and some blank. I want a situation ...
1
vote
0answers
368 views

Save custom attributes of product in woocommerce

I have some custom attributes for each product in woocommerce, I can edit them at the Attributes tab. I can also read them using this code $product = new WC_Product($product_id); $v = $product->...
1
vote
0answers
21 views

Show only one variaton in catalog on meta key

Hello i have too much products with variations. I need display only one variations if enable. Catalog display data via taxonomy.php and basic loop. How i can show only one variations but in filter i ...
1
vote
0answers
110 views

Creating custom permalink tags for WooCommerce

You guys already know about the tags available for posts to be used in permalink structure like %postname%, %post_id%, %author% etc. Though it works for the post type, it doesn't work for products(...
1
vote
0answers
298 views

Remove the product category module block from the Woocommerce product page

I want to remove this block: https://imgur.com/a/xzuto this is a category block on the product page overview. I want to remove this block but I cannot seem to work it out. I find a couple of "...