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

WooCommerce Shop Page Display Product Div as a Weird Loop

function neato() { global $product; if ( $product->get_permalink() ) { echo '<script src="https://code.jquery.com/jquery-1.10.2.js"></script><div class="new-projects"></div> ...
-1
votes
0answers
26 views

Advanced search with multiple fields

I'm using wordpress + woocommerce and I need to make an advanced search. I created the form: So one field must search at the post_title and the second at a producit attributte value. I made some ...
-1
votes
0answers
42 views

Woocommerce persistent cart on multisite

I am trying to make a global cart plugin for woocommerce. I want to use the details stored by woocommerce in the persistent cart since it is stored as a user meta and user tables are shared across a ...
-1
votes
1answer
48 views

Update wordpress menu with woocommerce products

For aesthetics purposes, i chose to keep the menu from my theme (twentyfifteen). I have a large catalog of products and i use Woocommerce to keep them into categories and products. Everytime I add a ...
-2
votes
1answer
78 views

Add woocommerce.css in template?

Why file plugins/woocommerce/assets/css/woocommerce.css for my template can not be read? Please look this image :
-2
votes
0answers
45 views

Can't change woocomerce checkout field to optional

I am trying to change checkout field like address to be optional (I need it only for companies). Therefore, I am using following code: $fields['billing']['billing_address_1'] = array( '...
-5
votes
1answer
31 views

woocommerce get product variation [on hold]

How can I get the currently selected product variations in the functions.php file? My goal is to add a button "Request price" to the product pages. When you click on the button a mail window should ...
-5
votes
0answers
24 views

Change Woocommerce total cart rates [on hold]

I have two categories names Regular Notebook Personal Notebook I want user to give 2 options in cart page before checkout. Canada England First Option: I want if user select only Regular ...
-1
votes
1answer
24 views

Adding Extra Customer Email In Woocommerce Checkout

I want to know how to call out a extra email filed in woocommerce checkout page. By default there is a email filed for customers to fill in, once he/she checkout they will receive the order copy. I ...
-1
votes
0answers
27 views

How to show sub category instead of product on woocommerce product category page

I have tried in woocommerce>setting>product>display> Default Category Display >show subcategories but is not working. I'm using woocommerce 2.5.4 and WP 3.5.4 with goodstore 3.0.3 theme. is there ...
0
votes
1answer
25 views

Display x number of terms and exclude hidden

I use the following code to exclude terms with hidden products. I want to display only 5 terms but when I add the parameter number it also take account of hidden terms so I get fewer terms depended on ...
-4
votes
1answer
40 views

Changing sale price programmatically, but it's not shown on front-end

I am importing sales prices from an inventory API and it works well. I'm setting the product price via meta keys, along with scheduled dates, and it is working; I can see them in product view and in ...
-1
votes
0answers
37 views

“Sorry, your session has expired” error on woocommerce checkout

I just discovered that my checkout page is not working for all non-logged (everybody) potential customers. Im using woocommerce and an error message "Sorry, your session has expired. Return to shop" ...
0
votes
1answer
35 views

WP_Query: Exclude hidden products from WooCommerce product list

I hope this is not too specific to WooCommerce. I have a nifty shortcode that displays a list of all my products with SKUs. However, it also includes products that I have published but have set the ...
-2
votes
0answers
14 views

Hiding Sale Price on Product Page Until Customer Adds to Cart or Checkout

We are looking for a piece of code that will allow us to hide our product sale price on the product page; display a message of our "Sale Pricing Available During Check Out". In return, it will show ...
-1
votes
0answers
26 views

Woocommerce add to cart button doesn't work with custom templates

I'm using twig for my WP templates and they work just fine. I've installed WooCommerce and all its templates into my theme folder so that I can overwrite them. I'm not planning to use twig with ...
0
votes
1answer
57 views

WooCommerce Variable Product Price not showing on single product page

I made custom attribute for variation other than size or colour, but when i apply as variation to this attribute its not showing on single page.
0
votes
1answer
38 views

Redirect if current user is logged out and current page is /my-account

I need my woocommerce site to do the following. If the user visits the /my-account page but is logged out I need it to redirect to the /login page. I currently have half of it (if is logged out) but I ...
0
votes
2answers
31 views

Add key and value to an array in another file

In my site I'm using the Product Archive Customizer plugin for WooCommerce. Great plugin. However, there is an option to set the qty of products shown per page. The next piece of code is responsible ...
-3
votes
0answers
20 views

Wordpress - change sorting of search results

the WP product search (WooCommerce) does a search of a term in the title and the product texts. Can I use a snippet in my functions.php to alter the search results in a way that the ones who have the ...
-3
votes
0answers
14 views

Lost data from variable after update product

I have problem bcs when I set value in dropdown list and refresh cart, product I lost this value. My code below: if ($_POST['period'] == NULL) { $cart_item['quantity'] = 1; } else { $...
0
votes
0answers
41 views

How to select N number of products and display it randomly in Woocommerce

I have a woocommerce setup with about 10,000 products, i would like to display all the latest products on the home page so that i can have N number of latest products from each PRODUC TAG displayed in ...
0
votes
1answer
20 views

WooCommerce Cart Items

I have this lovely script that presents the user with the number of items in their cart but not the number of products... <?php echo sprintf (_n( '%d item', '%d',count( WC()->cart->get_cart(...
-4
votes
0answers
40 views

Woo commerce star rating

I am using woo commerce but I want to customise the star rating for hearts instead is there anyway I can do this? I already have the heart PNG but don't have a clue how or where to implement this? ...
-1
votes
0answers
14 views

Product Query by meta_value and published date

I've seen some similar posts here, but this none that gives me really the answer. I have products that I want to order by their meta_key '_sku'. The SKU can be a number (ex. 1234) or alphanumeric (...
-1
votes
0answers
39 views

Overriding product search in Woocommerce admin

I need to alter the query used for the AJAX product search when adding or editing an order in Woocommerce admin. I want to add variation terms to the query. Using browser dev tools, I see the call ...
0
votes
1answer
32 views

Custom Woocommerce Category view

I'm kind of new to wordpress development and I'm trying to make a plugin so I can show all the categories I have in a list. The Idea is to customise the default view Instead of the default list: I ...
0
votes
1answer
19 views

Getting the date_diff function return the difference in days

I've been trying to build a feature to count the days it takes for products to be sold. We are selling unique items on behalf of our customers so it's good to know for reporting and product management ...
1
vote
2answers
124 views

Is WooCommerce updates for WordPress necessary? [closed]

Hi guys I have 2 notifications for WooCommerce currently! 1) - WooCommerce Data Update – We need to update your store's database to the latest version. 2) - WooCommerce plugin update to version ...
0
votes
1answer
45 views

Show posts count for Categories and Tags in wp_nav_menu

I'm trying to show WooCommerce Product Categories, Post Categories, Product Tags, Post Tags and Custom Taxonomy posts count in main navigation using wp_nav_menu. My WP_NAV_MENU code &...
0
votes
1answer
49 views

Query Strings and Woocommerce

I've got a wordpress website and am using WooCommerce to sell registrations for applications that I develop. To streamline the registration process, I would like users to be able to click a ...
0
votes
2answers
132 views

How to display product with two condition, category and brand taxonomy

I made a simple loop to display product base from category and brand (custom taxonomy.) Here piece of my loop: <?php $args = array( 'post_type' => 'product', 'posts_per_page' => ...
0
votes
1answer
33 views

Wordpress using get_term to retreive slug not working as expected

Im using the below code to try and get the slug for the current category and the parent category. Ive managed to get as far as getting the currently cat slug but the parent displays in readable text ...
0
votes
1answer
57 views

Custom query filter not working on woocommerce category page

I am trying to make custom filter for my woocommerce website. Everything is working fine in the shop page, but when I go to the archive page the filters are not working. I am recording each filter ...
1
vote
1answer
93 views

Remove duplicate product link from WooCommerce Page Row Actions

I'm desperately trying to remove the duplicate link from the WooCommerce Admin Product listing (page_row_actions). //Remove duplicate button from product list function my_duplicate_post_link($...
1
vote
1answer
25 views

Catchable fatal error on custom category post

I get this error after deleted a few of unused category's product on my woo theme: Catchable fatal error: Object of class WP_Error could not be converted to string in D:-mytheme\wordpress\wp-...
-3
votes
1answer
17 views

How to change redirect code? [duplicate]

How to change the function: woocommerce_myaccount_page_id code below: <a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?> "> To redirect it to WordPress ...
1
vote
1answer
108 views

How do I remove the product thumbnail link from a specific div in Woocommerce? [closed]

I have a section on my front page that displays the top 4 most popular products from my Woocommerce shop. I is located within a div as such: <div id="trending"> <p class="trending-title"&...
5
votes
2answers
102 views

How to update user role without logout

I am working on a wordpress project with the following plugins : Woocommerce Woocommerce product vendors WP Job Manager Wp Job Manager products I am trying to upgrade the user role after adding a ...
0
votes
1answer
28 views

Woocomemrce order and registration fileds to UPPERCASE

I have to transform all the registration fields (Name, Surname, email, State, Address...) to uppercase. I mean no CSS transform, like text-transform: uppercase; but transform in PHP before they go to ...
0
votes
1answer
46 views

How to remove coupon dropdown feature

I want to remove the coupon drop down feature and just have the input field and 'add coupon' button on the checkout page. Does anyone know how I can get rid of the dropdown feature? Thank you in ...
1
vote
1answer
50 views

Detect whether a page is a product subcategory page?

How can I detect whether current page is a product sub category page? I've tried with the following but it will always print out "NO" function is_subcategory($category = null) { if (is_category()...
1
vote
1answer
27 views

How do I edit pre_get_post for the category the user is currently in?

I've got a Woocommerce site that uses categories and products within those categories but how do I get my search form to only display results of products within the category the user currently is in. ...
-1
votes
1answer
26 views

How to get Woocomerce categories count

Is there a short way to get the number of categories in woocomerce shop homepage and also number of subcategories on category page?
0
votes
1answer
27 views

Remove action added through function

A theme I'm using modified a woocommerce that I'd like undo in my child theme. It's been added as shown: function theme_setup(){ remove_action( 'woocommerce_before_main_content', '...
-2
votes
2answers
91 views

Assign class to Drop Down Selections in WooCommerce Products Custom Fields

I have added a drop down to the WooCommerce Inventory Tab where the user can choose message to show in front end. In functions.php: // Display Fields in Back End add_action( '...
1
vote
2answers
91 views

Unhook action from child theme

I have decided to use a WooCommerce Storefront child theme called Galleria, when I have previously used the Storefront theme I have used the common remove_action to unhook the defaults and replaced ...
1
vote
1answer
28 views

Woocomerce language

I have no idea why woocomerce is not changing language. When I change language in wordpress everything is fine, but woocommerce language is not changing, but only in my language (Lithuanian lt_LT), in ...
-1
votes
1answer
67 views

The plugin generated xxx characters of unexpected output during activation

I know this question has been asked 100 times, and I've googled it and tried multiple solutions, but I'm still getting this error. I removed all the white space, tried to encode it in UTF-8 in notepad ...
-2
votes
1answer
59 views

Woocommerce's add_to_cart function returns false and doesn't add anything to the cart [closed]

I'm working on a Woocommerce SPA (Single-Page Application) and I'm trying to add a product to Woocommerce's cart but it just doesn't work. I'm doing this in a custom plugin. In a function that ...