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

0
votes
1answer
295 views

Override core woocommerce class

I have to override following WooCommerce core class methods: WC_Cart()->get_discounted_price() WC_Coupon()->validate_cart_excluded_sale_items() What I'm trying to do is WooCommerce does not ...
0
votes
1answer
156 views

Display WP-Types custom fields in post [closed]

I have a WooCommerce website where on products I added some custom fields using WP-Types plugin. The website has a section "News", which basically is a blog. How can I insert wanted products into a ...
0
votes
1answer
392 views

How to echo billing phone number under My Account in Woocommerce? [closed]

We're wish to get customer's billing_phone number & then put it under "My Account" or "My Address" section. This way, our billing support can look up for a number to call from the front-end, w/o ...
0
votes
2answers
208 views

Get product details by url key in Wordpress woocommerce

I want to load products deatails on my custom page.Is there any way that i can use the url key like http://localhost/mysite/product/samsung-1.In this url samsung-1 is the key for that product.I want ...
0
votes
1answer
1k views

WooCommerce: change display order of product short description and price [closed]

re: https://modestmix.com/shop/benefit-teas/go-the-fuck-to-sleep/ I'd like to move the price "$4.99–$24.99" below the product short description "Seriously. Drink a cup of this..." Any ideas how to ...
0
votes
1answer
164 views

There is no existing custom fields' value in functions.php

I'm using WooCommerce and Advanced Custom Fields plugin. I have a function for calculate my product's discount, like this: function woo_add_cart_fee() { global $woocommerce; $discount = ...
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
1answer
2k views

woocommerce - how to get product link by id

i have 2 product_cat Product cat 1 id : 6 Product cat 2 id : 8 in my index how to get product cat link with id or slug as: <a href="Product cat 1 (link)">Product cat 1(name)</a> <a ...
0
votes
1answer
2k views

Remove word “Category” from WooCommerce product page [closed]

I'm trying to remove the word Category from the product page. As far as I know the code that displays that is woocommerce_template_single_meta located into content-single-product.php file: <?...
0
votes
1answer
548 views

How to check if a product is purchased within the last 365 days before displaying something

I have a WP site using WooCommerce. Our products are made up of physical stock, a download and some links to pages on our site. I had set this up by placing the links to the specific product pages ...
0
votes
1answer
50 views

Woocommerce comments subscription [closed]

I want to ask you that I translated all my site's texts but I can not translate comments subscription option on product page. from which php file I can translate texts? Thank you in advance :) Here ...
0
votes
2answers
138 views

Disable Admin Bar Render on Plugin Page

In the WP Admin panel, I have a plugin that does certain calculations based on input from a form. I need it to print pretty, so I am attempting to render the plugin page without the admin menu etc. I ...
0
votes
1answer
935 views

Enqueue script on specific WooCommerce template

I would like to enqueue a lightbox script on the WooCommerce page content-single-product.php. I have tried the following via functions.php: if(is_page_template( 'page-gallery.php' ) || ...
0
votes
1answer
5k views

Migrate WooCommerce Orders [closed]

I need to export/import all WooCommerce orders from a clients old website to their new website. We basically took their website, redesigned it but the install and everything is the same - besides ...
0
votes
1answer
3k views

Programatically added attribute, set to 'show on product page' automatically. Woocommerce [closed]

Ive written a script to import products to a new install of Woocommerce. The products have attributes set up in the admin. This bit of code adds the attributes on import. update_post_meta($...
0
votes
1answer
627 views

woo product , wp_insert_post() never displays on the front end. What gives? [closed]

I've tried so many different ways of handling this, but every way results in the same exact result. All I'm trying to do is programatically generate woo products. As the most basic of implementations ...
0
votes
1answer
5k views

How to override woocommerce.css?

I would like to override woocommerce.css in my child theme. This is what I tried in my child theme's functions.php but it does not seem to work: add_filter( 'woocommerce_enqueue_styles', '...
0
votes
1answer
3k views

How to add metabox ONLY to specific WooCommerce product type [closed]

A little extra info: I have created a custom product type within WooCommerce. The add_meta_box function only accepts a 'post_type' argument. This means that I can get it on all products no problem, ...
0
votes
2answers
761 views

Hide a Menu Item on Login

I am using the following code to hide a menu item when a customer is not logged and show it when a customer is logged in. .hide-item-not-login{ display: none !important; } .logged-in .hide-item-not-...
0
votes
1answer
2k views

WooCommerce New customer email Hook? [closed]

I've created a sign up page for new customers to create an account. This is working fine but I would like to hook into WooCommerce customer_new_account inside WooCommerce/Classes/Emails/class-wc-...
0
votes
2answers
544 views

How do we exclude multiple pages (like opposite of is_page)

Scenario I have a following customized format for the website with Woocommerce. <?php if(is_shop()) {?> There are certain css styles, JS options used for this particular page <?php } if(...
0
votes
2answers
712 views

Use meta boxes inside an archive page template for Woocommerce

I'm creating my own Wordpress theme, and I'm trying to make it compatible with Woocommerce. I understand pretty much everything about theming woocommerce, including copying the template files and ...
0
votes
1answer
2k views

Woocommerce include custom stylesheet after woocommerce styling [closed]

After the upgrade to WC 2.1.2 my styling seems to be overruled by the standard WC styling. Is there a way to overrule the standard WC styling without using solutions like using the !important or other ...
0
votes
3answers
3k views

Wordpress Comment Box on woocommerce product page [closed]

can we activate same comment widget on woo-commerce product page which WordPress gives on post or pages. actually i want other users should be able to comment on others comment which is not allowed in ...
0
votes
1answer
5k views

Setting an attribute as variation in woo commerce via php [duplicate]

I have a front-end form I am creating to allow users to publish a variable product to my shop from the front end with predefined attributes and variations. I have found this very helpful question: ...
0
votes
1answer
52 views

Results not being printed

I am trying to run the following code, which i got from the site but i don't see any output.When i do print_r($product) only then i get array back. $args = array( 'post_type' => 'product', ...
0
votes
1answer
28 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 ...
0
votes
2answers
33 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 ...
0
votes
1answer
21 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(...
0
votes
1answer
97 views

WooCommerce Bookings Plugin Not Saving Order ID

I have built a site using WooCommerce Bookings with an AJAX request that processes the payment, creates and order and lastly creates a booking with the order ID. However, when I send the newly ...
0
votes
1answer
42 views

Change Woocommerce languange on a multisite install

I have been trying to figure this out but seems that there is no way to do it, and I don't want to use WPML, I have been using it and it's super heavy and buggy. So, the question is ... Is there a ...
0
votes
1answer
35 views

How to create a custom page in woocommerce?

I would like to create a blank page, which is used to list out the product by the category , so far I have found some code like this: $args = array( 'post_type' => 'product', '...
0
votes
1answer
86 views

How to change Woocommerce breadcrumbs content?

I want to customize the breadcrumbs directly from PHP. Some of the pages are generated dynamically and do not exist in the database, therefore i must automatically put them in the breadcrumbs with ...
0
votes
1answer
69 views

How add body_class from wp_termmeta

I need to assign a class to the body for woocommerce categories. What I've done: // add the fields when the term is created add_action( 'product_cat_add_form_fields', 'add_product_cat_class_field', ...
0
votes
1answer
78 views

How to set up Custom Post Type archive page as Front page

I've registered a custom post type named portfolio and have coded it's respective archive-portfolio.php file. Now, my requirement is to make this page available to be set as front page. For which I ...
0
votes
1answer
41 views

How can I add an extra WooCommerce hook

In the standard WooCommerce template file content-single-product.php there is a set of hooks that control the way the page lays out in a series of blocks which are called by a series of hooks eg '...
0
votes
1answer
48 views

How to increase execution time out limit in WordPress dashboard?

One of my plugins creates a time out every time I visit the Products admin page in my WooCommerce website dashboard. I can't deactivate this plugin as it's absolutely essential for what we do. Any way ...
0
votes
1answer
27 views

Customizing WooCommerce

I'd like to customize something in woocommerce. Here is the example: I've added some categories in woocommerce (Product Categories). For example, there are two categories like "SALE" & "New ...
0
votes
1answer
136 views

Display File Types For Woocommerce Downloadable Products On Product Page

I offer downloadable products with woocommerce and each product is allowed to have multiple files. I would like to display the file types/formats on the product page so users know what each product ...
0
votes
1answer
96 views

Woocommerce Register Error

Before posting this question i have tried solution posted here https://support.woothemes.com/hc/en-us/articles/202828575-Redirect-to-a-custom-page-after-logging-in I need to redirect user at specific ...
0
votes
1answer
156 views

Get product link

I want rating from customers by sending mail after order is completed. If customer will click link on mail for review it should redirect to same current product page of my site. How do I do this. I ...
0
votes
1answer
248 views

Getting Wordpress database error Deadlock

I keep getting errors like the following: [29-Dec-2015 03:06:14 UTC] WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM wp_options WHERE ...
0
votes
1answer
731 views

WooCommerce return 404 on category pages

I am trying to set up WooCommerce permalinks to get something like: example.com/shop/ => Shop page listing products example.com/shop/category-name/ => Category page listing products from a category ...
0
votes
1answer
74 views

How to change layout of shop page in wordpress? [closed]

Currently I am working on shop page. And according to the design I have to insert a banner after 4th product and after 7th product and I have 3 products in each row and Banner's size is equal to the ...
0
votes
2answers
45 views

Change permalink for custom_post_type using custom_post_meta (woocommerce)

I would like to replace the permalink for all products in a woocommerce/wp installation with a custom link, if it set in a custom_post_meta. The custom_post_meta is setup and working fine. From all I ...
0
votes
1answer
173 views

Multi-vendor with custom shop site for each vendor

What is the best way to create a multi-vendor site that allows user to register as a vendor and not only this but it provides the vendor a new custom shop web-site which he/she can customize by ...
0
votes
2answers
224 views

Use WooCommerce function in other Wordpress plugin

I am currently trying to make a plugin which updates the stock count of my WooCommerce products. So I wanted to access the wc_update_product_stock function, but an error got returned instead. Code ...
0
votes
1answer
171 views

WP_Query for products always returns empty

I have a simple following logic: $args = array( 'post_type' => array('product'), 'product_cat' => 280, 'posts_per_page' => 3 ); $category_posts = new WP_Query( $args ); ...
0
votes
1answer
151 views

WooCommerce set a min order price for a single country

I'm trying through this code to set a minimum price for orders: // Set a minimum dollar amount per order add_action( 'woocommerce_check_cart_items', __NAMESPACE__ . '\\spyr_set_min_total' ); ...
0
votes
1answer
110 views

Change WooCommerce add_to_cart Button Text?

I am trying to change the add_to_cart button text for all products based on category. For category 'course' with ID 330, I would like the button to read 'Register'. For all other products, I would ...