Category "product"

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

I use WooCommerce short-code [add_to_cart ] inside a widget sidebar On WordPress website to display “Add to cart” button on product pages (wanted to

Split a WooCommerce order and create a new order if the original order has products in backorder

I have the custom order status and it works. What I need help with here is looping through the order items and checking if any of them are on backorder and if

Filter WooCommerce related products by Polylang language

I'm using polylang plugin to having multi-languages website. Using WooCommerce with polylang demands duplicating each product for each language, so assuming I h

Get all WooCommerce products within own plugin

Within a plugin how do I get products using wc_get_products()? Or is there another way to do it? if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'a

Woocommerce update admin order item price based on user meta

I'm trying to update item price for orders with users that have a custom field marked as "true". The item price needs to be updated to a custom field that is in

Magento 2 product collection sorting is not working (I am doing with custom attribute)

This is my code $_productCollection = $block->getLoadedProductCollection()->addAttributeToSort('article_position', 'DESC'); echo '<pre>'; print_r(

Adding a "Buy from Amazon" button to my collections shopify pages?

I have my products available on both Amazon and a dedicated Shopify store. For customers looking to take advantage of Prime shipping over what our store can off

How to hide products with stock less than 2 on WooCommerce shop page

I own an e-Commerce business and i want to hide the products that have a stock of less than 3. This is what i came up to: add_action( 'woocommerce_product_que

Insert a DIV after the 6th product only once in WooCommerce category archives

I would like to show some content after the fifth product of a product category. Based on Add content in between product rows in WooCommerce archives answers co

Change the alert text on add to cart action without selected variation in Woocommerce

in Wordpress I'm using Woocommerce v3.3.5 and in single product pages for variable products, When I click the add to cart button while I don't select a variatio

Get WooCommerce product variation attribute terms in admin products general box

I display the id and sku of each variable product in the general tab - of the wp admin product data box with the following code. Any idea how to get the the var

Add rows to Single product Additional information table in WooCommerce 3.6

I am trying to add a row to Single product Additional information table. Actually is there any hooks or filter to do this? I have searched the hook but can'

woocommerce_wp_select options array from product attribute terms

I am trying to create a drop down list box in woocommerce but have it populated with data from the database. I have the majority of the code working but the po

What's the time complexity of prod() in math in Python

Summary) What's the time complexity of math.prod() How to improve this code to get to the pass Details) Currently working on 'Product of Array Except Self' on L

woocommerce category rating based on reviews

Right now i use this code, it calculates all products ratings in one category and shows it as 5/5 (200 reviews). The 200 reviews are gathered from all 10 produc

Add a custom text for a particular product on specific email notification in Woocommerce

I want to add an extra text "There is an offer in this particular item etc" only for a particular product(Product Id:1) in customer-completed-order.php in WordP

Reorder attribute dropdown terms in Woocommerce single variable products

In the Woocommerce single variable product pages, I would like to change the order of the sizing options on the related drop-down menu. Actually It is like thi

How do you add custom field to woocommerce product attribute

I want to include a simple in the edit attribute form. (/wp-admin/edit.php?post_type=product&page=product_attributes&edit=55) Is this possible? Everyt

Filter WooCommerce products with post__in and additional meta queries

I am trying to find products that are on sale (including product variations) in addition to another meta_query of price under X. The wc_get_product_ids_on_sale(

WooCommerce Additional Information - if empty, hide

I'm working on an eCommerce project at the moment. I'm using WooCommerce in WordPress. I've got ridden of the product data tabs and displayed product descripti