How to Get WooCommerce Product Name with WP_Query? – WordPress
I am trying to use this code on "Wp All Import". If there is a product name in the database, that product should be omitted, but the code will not work as is. What do I need to do for…
I am trying to use this code on "Wp All Import". If there is a product name in the database, that product should be omitted, but the code will not work as is. What do I need to do for…
I see that it is possible to add your custom field for sorting products in WooCommerce (e.g. this question) Copying from the example: add_filter( 'woocommerce_get_catalog_ordering_args', 'enable_catalog_ordering_by_modified_date' ); function enable_catalog_ordering_by_modified_date( $args ) { if ( isset( $_GET['orderby'] ) ) { if…
Maybe someone could give me a hand resolving this challenge. I was looking for a solution which would allow me to add products to cart by SKU's instead of WooCommerce generated ID's as I would like to use the same…
I'm having a hard time to automatically hide some products based on id from shop loop, search etc if the stock drops bellow a specific number. I'm trying to do this because I'm trying to reserve lets say 20 items…
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() function will return the IDs of products (including variations) that are on sale. Therefore I added…
How do i set a different product per page for desktop/mobile? At the moment i have this code in functions.php: add_filter( 'loop_shop_per_page', 'new_loop_shop_per_page', 15 ); function new_loop_shop_per_page( $cols ) { $cols = 15; return $cols; } But on mobile i…
When the product subtotal is more than 3000, it has to be another price. I added it as a meta field to products. On Stack Overflow, a long time ago someone advised me the filter for a special price called…
On my Woocommerce site, I have 2 different product attributes (artist and type). I want to execute some code when on a attribute archive page containing one of those attributes and their value. For example: on site.com/artist/rembrandt/ showing all products…
It would make a lot more sense if the related products title linked to more of the related products being displayed... Attempting to change the related products title on the single product page to a link to the end category…
I need to change the normal behavior of the place_order button at checkout: if there's already an order which is not completed (status = processing), WooCommerce should add items to that order instead of creating a new one. Otherwise, it…