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

learn more… | top users | synonyms

1
vote
0answers
22 views

wp_set_object_terms being undone

I am trying to set some object terms on a Woocommerce product when it is saved. My code is as follows. add_action('set_object_terms', 'update_attributes_after_save', 99, 3); function ...
0
votes
1answer
170 views

Modify WooCommerce email shipping text value

I'm attempting to use the 'woocommerce_order_shipping_to_display' filter to show 'Free' in the WooCommerce email table when no shipping charges will be incurred. In the image, I'm trying to get the '...
1
vote
1answer
1k views

How to get product count with respect to categories in WooComerce

Hi I want to display all the categories of products in a loop to display them in category menu along the numbers of products each category contains. Some thing like that so far I have done this to ...
6
votes
0answers
585 views

WP/WooCommerce REST API cart/checkout/order [closed]

Since the WordPress Rest API is getting merged into core and WooCommerce extended their API as well I stared to wonder how it would be possible to build an entire eCommerce website with it. When you ...
0
votes
1answer
1k views

Integrate WooCommerce theme with a Wordpress theme [closed]

I have some questions about WooCommerce theme's integration into an existing Wordpress theme: Is it possible to integrate a WooCommerce theme into an existing Wordpress theme? Should I make my theme ...
0
votes
1answer
79 views

Which Multi-language option for Wordpress is best from an SEO and Woocommerce perspective?

I am wanting to set up an English and German version of a site for selling products and using content marketing. So I will be doing key word research in both languages. There will be a lot of ...
0
votes
1answer
126 views

Woocommerce purchase date [closed]

I am creating a membership site with Woocommerce and need to display how long is left on the membershop, I am guessing I need to do a DB query to get it, but is there a function I have missed that ...
0
votes
1answer
330 views

WooCommerce - Redirect to a product after login

I found myself in a spot of bother: I have a page with an eBook you can read from the browser, access to which I sell through the WooCommerce. The idea is incredibly simple: on the front page is a ...
0
votes
1answer
645 views

UWooCommerce - add cart discount programmatically?

I need to develop a plugin that applies a discount to the cart if x number of products have been purchased. Could someone point me in the direction of the code/API I need to use. Can find nothing ...
0
votes
1answer
73 views

Order Woocommerce Products by Latest Reviewed

In my Woocommerce site, I have: [recent_products per_page="16" columns="4"] which as the shortcode infers, orders products by the most recent. If I wanted to order my products by the ones latest ...
0
votes
1answer
179 views

Problem with hidden products on woocommerce

I'm dealing with a common problem for what I saw. When I hide "Out of stock" products, they keep counting on the pages. For example: I show 24 items per page, if 10 are out of stock and I hide them ...
0
votes
2answers
166 views

Show pop up message for specific categoryies

i have 2 categories that have book in adult, So i need when any user open this category to show him pop up message like :- The content you are about to view are of a mature matter. Please be advised ...
0
votes
1answer
24 views

How to display Woocommerce catagories

I want to display woocommerce products catagories in my wordpress sidebar theme. what is the code for it ?
0
votes
1answer
102 views

Custom action not working in Woocommerce

I've created a custom action in woocommerce in order to rewrite the breadcrumbs function and put it in another place into html, but it didn't work. Firstly, I removed the original Woocommerce ...
0
votes
1answer
990 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 cart. For example, if there are already products A,B in the ...
1
vote
1answer
398 views

Attach PDF to Woocommerce email

Hello WP Stackexchange! I'm running a woocommerce shop, and i need to attach my terms and conditions pdf/link to the email that my customers receive when they buy a product at my shop. Is there any ...
0
votes
1answer
38 views

Declaring a new woo commerce product type i get this error

Warning: Missing argument 1 for WC_Product_PJB::__construct() class WC_Product_PJB extends WC_Product { public function __construct( $product ) { $this->product_type = 'pjb_product';...
0
votes
2answers
149 views

Strip string from $_product->get_title() to get a cleaner mini-cart

I am using a customized mini-cart.php file, in which there is this line of code: $product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $...
0
votes
1answer
387 views

Woocommerce Mandatory Field on Shipping Details

I am trying to add a Phone Number mandatory field to the Shipping Details page of the Woocommerce checkout but it should only be mandatory if an alternative shipping address is selected. Woocommerce ...
1
vote
1answer
334 views

Can I remove WooCommerce main content hook?

<?php /** * woocommerce_before_main_content hook * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb -...
0
votes
1answer
258 views

How to get the perfect WordPress, WooCommerce, Custom Post Type pretty permalinks?

I would like some clarification on how to achieve the following structure: Posts & Categories domain.com/blog/ - Blog index domain.com/blog/%category%/ - Blog category archive domain.com/blog/%...
0
votes
2answers
465 views

widgets_init actions not fired from functions.php's child theme

I need to add new sidebars for using them accordingly on different pages throughout my shop. I use Woocommerce and my own Storefront child theme. This is a snippet of what is in functions.php file ...
-2
votes
1answer
670 views

Use Homepage as “Shop” for Woocommerce

I have a store I'm putting up, and the store itself is located on the homepage. I built my own template to do this and the homepage looks great. However, it looks like I actually have to set a "shop" ...
0
votes
1answer
235 views

Cannot save values to custom fields for variations on Woocommerce 2.4.6

I'm having trouble setting up custom fields for variations on Woocommerce. I followed this very helpful tutorial to get the ball rolling, and everything worked well enough except that my values for ...
1
vote
2answers
540 views

Order by rating not works in wp_query

I need to sort my products by rating in a wp_query loop: this is my code: switch($ordering){ case 'default': $meta_key = ''; $order = 'asc'; $orderby = 'menu_order title';...
0
votes
1answer
806 views

Automatically add attributes to woocommerce product?

I'm trying to make WooCommerce automatically add some attributes to a product when it's created. I'm trying to find the right hook to start with, so far the only one that seems correct is '...
0
votes
1answer
171 views

Adjust Price Display for Variable Product in Woocommerce [closed]

I want to adjust the price display for a variable product so that instead displaying as something like "$10.00-$12.00" it will display as "$10.00 or $12.00" -- essentially replacing the ndash with an "...
0
votes
0answers
112 views

Woocommece Variable Product Dropdown hide other two dropdown [closed]

I am using wordpress woocommerce.Here i have question about variable product for woocommece.Here in woocommerce initially all drop down options load.Now is this possible to load it based on first ...
0
votes
1answer
35 views

get_posts $args won't accept array as one of the criteria?

The goal is to list attachments underneath a WooCommerce product, using the tags from that product. Everything works fine if I manually enter the tags at 'product_tag', but when I try to use an array $...
0
votes
1answer
120 views

Change Meta Title seperator and remove on homepage

I'm trying to change the character which is used as a seperator in my page title. At present it is in the format Site Name - Page Title However I would like to change this hyphen to a pipe ...
0
votes
2answers
2k views

woocommerce: how to use wc_create_order with subscription product

I want to create a new order programatically. This code works well with simple product, $product = get_product($product_id); $order = wc_create_order(); $order->add_product( $product ,...
2
votes
1answer
60 views

Over write plugin templates

Is that possible for overwriting a plugin templates via making a folder in theme file and copy the file in that folder and altering the content [both folder and file name have the same name as ...
-1
votes
1answer
117 views

Which template file to edit to edit homepage in Mystile [closed]

The homepage I'm using is not a static page, and I'm currently trying to add a content slider to it using master slider. I'm not too sure which file the homepage takes on as it's template, so I'm not ...
0
votes
1answer
332 views

“Trying to upload files larger than” error will not go away

I have a woocommerce setup for virtual products. All products are around 10MB and uploaded fine. I do however keep getting the following error show up when browsing the store: Trying to upload files ...
0
votes
1answer
72 views

Get Non-Paginated Index of Post in Paginated Query

I want to number "product" post types according to their position in their archive. Currently, I have tried to do this by creating a counter variable $count and incrementing it in the loop in my ...
0
votes
1answer
91 views

Woocommerce: Any way to list all products *without* a specific attribute?

We're going back through an existing site and adding attributes to the products, but we need a way to verify that every product has gotten them. Is there any method or function call that will give ...
0
votes
0answers
21 views

Find the page template that is being used [duplicate]

I have a website using woocommerce and I need to customize its login form, however the file in the path /mytheme/woocommerce/myaccount/form-login.php seems to be ignored. How do I know the path to the ...
0
votes
1answer
341 views

Users credentials and syncing from third party with WooCommerce

I am trying to build a web store for a client who has already had a mobile app. the mobile app team would like to sync user's password as they update it both on the mobile app and the web store. ...
1
vote
0answers
29 views

How can I run a multi language WordPress site in two folders in one install?

I would like to achieve something like this: www.site.com/en www.site.com/fr A single WordPress installation but it is translated into French and English and also the theme support, posts and ...
1
vote
1answer
356 views

Get post from custom post type order by two taxonomies

In woocommerce i want product by brand (ORDER BY A-Z) with specific custom taxonomy. I have two taxonomies product_cat and product_brand. I did some code to reach my goals but the problem is i have to ...
0
votes
1answer
21 views

What is the earliest hook you can piggyback on to check terms/taxonomy for a collection view?

I am attempting to set up some conditional logic based on whether or not get_the_terms( $post->ID, 'product_cat' ) has the term 'Photographs' in it. Currently I'm using the wp hook, but that doesn'...
1
vote
3answers
2k views

Add CSS class to add-to-cart button, Woocommerce [closed]

Im looking for a way to add a custom class to the add-to-cart button on the single-product.php page in Woocommerce. I have tried the following without any result: Copy whole woocommerce-folder from ...
-1
votes
1answer
221 views

Run function on “Place Order”

I'm building a custom checkout, that uses steps, like those used on Apple. http://www.formisimo.com/blog/wp-content/uploads/2013/09/Apple-stage-one.jpg When an input field is marked as invalid, I ...
-4
votes
1answer
518 views

Creating products using a REST API

I want to build a wordpress website which will have a lot of products (for beginning 0.5 million). Therefore, an third part API will be used to create the woocommerce products. However, i'm confused ...
0
votes
1answer
126 views

Check if value exists before saving

I added an extra registration field: function wooc_extra_register_fields() { ?><p class="form-row form-row-first"> <label for="billing_cpf"><?php _e( 'CPF', 'woocommerce'...
1
vote
2answers
43 views

Help with some php math in Wordpress

I've made a woocommerce store and I am using a dropshipper - so every product has an price and a trade price for me - which I am importing and storing as a custom field 'trade_price' on the product. ...
1
vote
1answer
390 views

How to set value/term of a Woocommerce attribute text field in admin panel?

I am developing a plugin which is supposed to auto-fill the attributes text field. There is a URL text field where user enters URL, on focus out I trigger a AJAX call through which I am able to save ...
0
votes
1answer
805 views

Disable woocommerce PLACE ORDER button if user selected products that are not available for international delivery

In my woocommerce site, I list both products that are available for shipping to India as well as International destinations. Am assigning a only-india shipping class to certain products so as to mark ...
0
votes
1answer
85 views

print script on wordpress header after user registered

I should attach javascript snipet after user is registered on my wordpress site, i user the user_register hook like this do_action('user_register', $user_id ); add_action('user_register', '...
0
votes
1answer
274 views

Delete all per-product attributes in WooCommerce

Is there a method to find & delete most/all attributes for products in WooCommerce when these attributes are unique to each product, that is they don't appear under the Product->Attributes menu? ...