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.

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-...
0
votes
0answers
16 views

How can I import and export woocommerce products with image? (Not image link, proper image)

I want to export and import products with images, if i import a product from CSV, and I put the image in CSV file. So after upload, wordpress/woocommerce make the image as featured image. Please help ...
0
votes
0answers
13 views

How to add a special Woocommerce “Buy Now” button?

I wish to add a "Buy now" button on product page, and redirect to checkout page after clicking it but without adding the product into the cart. For example, if there are already products 1 and 2 in ...
0
votes
0answers
9 views

Print Gift messages from within WordPress/WooCommerce

I have an option to add a gift message (using product add ons plugin) on the product page. When I am processing my orders I then have to copy and paste each gift message one by one into a Microsoft ...
0
votes
0answers
9 views

Display Woocommerce review stars without any reviews

I wrote this code to display empty Woocommerce review stars if there are no reviews on the single product page. Currently, Woocommerce doesnt display any review stars is there are no reviews for a ...
0
votes
0answers
15 views

Remove custom role when subscription expires

I have two different types of subscriptions (basic and plus) and have a different role assigned depending on which subscription is purchased (3rd party plugin). So when the basic is purchased, they're ...
0
votes
0answers
3 views

How to link to page with matching posts/products

I feel like I must be really stupid because I've spent so many hours trying to work this out and have got nowhere. I've been working on a plugin which mainly uses AJAX and WooCommerce REST API to ...
2
votes
1answer
18 views

Wordpress codex: apply_filters - clarification on creating a new hook on the fly. How do we use it?

I have read the WordPress Codex on add_filter and apply_filter countless times, but it wasn't until reading woocommerce source code today that something clicked in the way that maybe I don't ...
0
votes
0answers
8 views

Woocommerce change send another email if order total is 0

I want to create a custom email if order total is equal to 0.0. How do I check this condition and prevent to send the default email? I was trying to play around with ...
0
votes
1answer
15 views

Duplicate shipping method logic to another shipping method

I have a plugin that adds additional shipping method with some intricate logic to it that adds specific checkout fields with API-generated values etc. The thing is that I need variation of this ...
0
votes
0answers
13 views

Add to total price if product is in a specific category

I have 3 categories on my site (small-cars, cars, truck) and each category has a different formula for "extra miles": small cars (1 * field) (2 * field), trucks (2.5 * field). Like the calculation ...
0
votes
0answers
14 views

Product permalink not updating

I want to select default product permalink but not update. After update the setting the product permalink save as custom base. Any one can help me Please...
0
votes
0answers
16 views

Remove product category placeholder image (Woocomerce)

I'm trying to get rid of placeholder product category images on the shop page. Right now I'm using this code to add a .no-image class to products that don't have an image so I can style them ...
0
votes
0answers
19 views

woocommerce wc_get_product is not fetching all the product of particular category

I have created dummy product data with fakerpress and many products were created with "future" status, so I updated the post status to "publish". I wanted to retrieve all the product of selected ...
0
votes
0answers
31 views

Woocommerce html emails are just broken - it automatically adds many “=” characters spread randomly within the code

after many hours of trying to fix this mysterious issue I decided to reach out for help. Thanks to everyone willing to aid me. When I send HTML emails from Woocommerce, those emails are received ...
0
votes
0answers
22 views

Deep level variables woocommerce on add to cart page

Please advise a way or a plugin or a method to assist with building the structure below. I would like an attribute nested within another attribute nested within another attribute for a specific ...
0
votes
1answer
17 views

Add custom attribute to product's HTML to woocommerce cart page

I'm trying to add a data-attribute to WooCommerce's cart page. The cart page populates a table with each row being a product that has been added to the cart. I'm able to add a data attribute into ...
0
votes
0answers
13 views

update ACF user metas programmatically [on hold]

I use woocommerce where I have a custom hidden field on checkout page which is populated by a survey. Each user has some user metas created over ACF and I would like to add this hidden data to ACF. ...
0
votes
0answers
16 views

Change WooCommerce template for PDF - access to custom field

I want to do some modifications to a template of WooCommerce, but I'm rather ZERO in PHP, so that is why I'm asking some guidance so I could perform my small modifications, which I'm sure are not too ...
0
votes
0answers
10 views

How to add a inbuild block using a code? [on hold]

How I can add an inbuilt block using the code directly to the Dashboard??? Is there any function?? or code which add a block, for example, shortcode block.
0
votes
0answers
10 views

Product adding to cart without variation being selected first

We have the woo side cart added, when a customer clicks on an item it automatically adds to the cart even before they select the size or colour, how can we stop it from doing this. It will even add ...
0
votes
0answers
9 views

Is it possible to have multiple product_tag in a WordPress URL?

I'm trying to create a custom link that combines two product-tags for filtering products that have the product-tag man AND brandname. I'd like to put in the same link the following two example links: ...
0
votes
0answers
25 views

woocommerce axios react

I don't understand why my request to WooCommerce API doesn't work. My usage on react App via axios: First try: return axios.get( 'http://domain/wp-json/wc/v3/products?featured=true', { ...
0
votes
0answers
7 views

connect woocommerce custom field to wp user meta upon customer registration

I'm adding a custom field on my woocommerce registration that actually saves customer IG usernames by using this code below placed on my child theme's function.php file: function ...
0
votes
0answers
5 views

Order selector when using woocommerce products shortcode [closed]

If I display products with shortcode like this: [products category="edesitok" pagination="true" limit="12" columns="3"] there is no sort order selector on the top of the list (for visitors) like "...
0
votes
0answers
16 views

How to limit which information about a product is returned by wc_get_products (WooCommerce)?

My current code uses wc_get_products to return all published products that are instock: $wc_products = wc_get_products(array( 'status' => 'publish', 'stock_status' =...
0
votes
0answers
15 views

Help to arrange attribute product in right order in woocommerce

I have a WooCommerce website where I want to sell shoes, but I have a strange problem. The attributes are set randomly and don't fit the order set in attribute custom order. I have this function which ...
0
votes
0answers
13 views

Add extra products on add-to-cart action

I'm having some trouble adding extra products on add to cart button is executed. Basically, the user gets a few extra products in the product to choose from, My problem is that the user can still ...
0
votes
0answers
12 views

Comment review not mandatory

I have a star rating system in my web, and I need comments to not be mandatory so that customers can review only using the stars. How can I do that? Thanks!
0
votes
1answer
13 views

How to show Custom Field Value in Woocommerce Shop Page

remove_action('woocommerce_shop_loop_item_title','woocommerce_template_loop_product_title',10); add_action('woocommerce_shop_loop_item_title','fun',10); function fun() { echo 'custom_field_value'; } ...
0
votes
0answers
7 views

WooCommerce: How can I select the catalog_visibility for a product?

I know, as simple as it sounds but I don't get it running: How can I select the product visibility for a product by his id via SQL? This is what I have: global $wpdb; $result = $wpdb->get_col( "...
0
votes
0answers
18 views

Error on Wordpress site: “an error occurred while processing this directive”. Have debug.log output available

Hope someone might be able to shed some light on this one. The error is very generic and seems quite unpredictable. Happens on some page loads, not others, and when it does, if you refresh a few times,...
0
votes
1answer
26 views

Shop Manager role cannot edit pages using WPBakery Page Builder [on hold]

I'm using both WPBakery Page Builder version 5.4.7 and Woocommerce version 3.5.1 on a site I'm working on. Even with the settings enabled for the Shop Manager role to access and use the Visual ...
0
votes
0answers
9 views

Sometimes I am still getting 404 error if I call add_rewrite_endpoint & flush_rewrite_rules on activation / deactivation hook

I need to add a custom tab to my woocommerce my account page, so I followed this article: https://github.com/woocommerce/woocommerce/wiki/Customising-account-page-tabs#creating-new-endpoints /** * ...
1
vote
1answer
11 views

Automatically Update Woocommerce Prices

I am running on WordPress v4.9.8 using WooCommerce v3.4.2. Recently I've made an Excel spreadsheet which collects competitor's prices for multiple products via query. My target is to follow these ...
0
votes
0answers
10 views

Trying to edit Product page /w Woocommerce, Fatal Error appears

I try to edit my product page, but this error appears: Fatal error: Out of memory (allocated 116916224) (tried to allocate 603392 bytes) in /home2/~/public_html/wp-includes/class.wp-scripts....
0
votes
0answers
17 views

Wordpress wp_set_object_terms() not working fully with WooCommerce

My custom taxonomy (WooCommerce attribute) already exists and I am using the following to add a new term to the taxonomy and associate it with my WooCommerce product: wp_set_object_terms($product_id, ...
1
vote
1answer
41 views

Getting categories id for all products in cart

What I'm trying to do is to take the categories for products which are in the cart. Then check via some conditions what category id is and show different notice. So far I have this /** * Cart ...
0
votes
0answers
7 views

Chinabrands with woocommerce [on hold]

I'm not good in this so i would like to ask if there is any option to sync woocommerce orders with Chinabrands. I want to automate the process for Dropshipping.
0
votes
0answers
15 views

How to add orders manually to woocommerce [closed]

I'm working on a website for a customer who gets orders from call center ( runs ad on TV). The call center receives the customer info on the phone and sends them to him by the end of the day. Right ...
0
votes
0answers
5 views

Woocommerce: Allow Offers and Purchases While Hiding the Add to Cart Button

I have only basic knowledge of wordpress/web development and need some help. I am developing a woocommerce site for a family member that sells very pricey items (think $20,000 or more). I want to ...
0
votes
0answers
6 views

woocommerce - how to add custom field in one page checkout?

I can add custom fields to normal checkout pages of WooCommerce. But our company decided to try Woocommerce One Page Checkout. I wanted to collect additional information by using <input> text or ...
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 ...
0
votes
0answers
12 views

Adding additional information to Admin Order Preview

Looking at adding the actual shipping costs of an order to the order preview pop-up. I think we have to use add_action with woocommerce_admin_order_preview_end and maybe even using add_filter to ...
0
votes
0answers
7 views

How to handle 1000's of variations? [closed]

I have a custom made suit site. Where user get to choose from fabric range to collar style etc. But I am stuck in variations. If I have 100 fabrics, 5 collar styles and button colors which are only 3 ...
0
votes
0answers
9 views

Getting Subcategories of specific category and display subcategories in the li tag

I use this code to display the main categories of my woocommerce store Now, I want to display the subcategories of that category using the category name my code <?php function ...
0
votes
0answers
9 views

Woocommerce shows product images in the wrong size

All products in my website have 200x200 featured images. But in catalog images are shown in 750x750 (sooo blurry) instead of 200x200. Source code of catalog page: <img width="200" height="200" src=...
0
votes
0answers
10 views

Woocommerce grouped products, group all the products of a category at the same time

I have a grouped product called Pizzas, and I need to link more than 30 ingredients to this product "Simple products", Woocommerce currently has that option available, one adds three letters in the ...
0
votes
0answers
7 views

promote woocommerce items on another wordpress site

I have multiple related wordpress sites. one of them has woocommerce. is there a way to promote some of those products (maybe identified by category or new or something like that) on one of my non-...
0
votes
0answers
11 views

Pagination not working correctly

I wrote a query like this: $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $q = new WP_Query( array( 'post_type' => 'product','posts_per_page' => 15,'paged' => $paged) )...