I created a field in ACF plugin. I added the code below to show the data as a custom tab but the tab is always visible even if the field is empty. What am I missing? // 1.Displays the tab on every product page add_filter( ‘woocommerce_product_tabs’, ‘woo_new_tab’ ); function woo_new_tab( $tabs ) { // Adds ..
Category : product
I need that, if a sipmle product contains some tags, (example: if (in_array($term_id, array(261,262,263,264,265,266)) ) to show another products (picture and title) which are containing that tag, too. So, single product has a tag with an ID 262 and it has to reasearch, is there any other product who has the same tag ID 262, ..
I’m using the code below to change a product price to text (Contact for Pricing) when the price field is left empty: add_filter( ‘woocommerce_get_price_html’, ‘change_special_product_price’, 10, 2 ); function change_special_product_price( $price_html, $product ) { if ( $product->id == 6917 ) { $price_html = ‘<span class="woocommerce-Price-amount amount">Contact for Pricing</span>’; } return $price_html; } add_filter(‘woocommerce_empty_price_html’, ‘custom_call_for_empty_price_html’); function ..
I am using the code below to calculate the prices for some specific products in certain categories and it works. the cart shows the corret value just like the checkout. The problem is in the mini-cart (if that is the correct name for the cart panel that shows up whenever i add a product in ..
Hello community, I want to show an image uploaded via custom-field on the product table and finally on the PDF invoice … I use this solution: Add image file upload field to WooCommerce single products (LoicTheAztec‘s answer) to make the image-upload work and now I want to extent this solution to show the image (img-name ..
Hello Friends i need help to create Product Form and its Dynamic Product Attributes with values and How to store in db ? how to manage stock of products and it’s variants using PHP MYSQL ? Please Help to Solve this Problem ? i am little bit confuse to how to add different different Cateogories ..
Instead of adding variations for each product separately, could we add a global set of variations just like global attributes for each product? Sourc..
I found an awesome response here that helped me display the product attributes as I wanted on my product archive page here: Display specific product attribute in Woocommerce archive pages It is almost perfect despite being several years old. My issue is that I don’t see where that array is being looped over in order ..
We have a large variety of products in WooCommerce, some of which are not our own and supplied. I am trying to set up a functionality where free shipping is disabled if the products in the cart belongs to "Extra" shipping class exclusively. If there are any other products with it that are not in ..
I’m trying to programmatically bulk add products in WooCommerce but for some reason, it’s only adding the first product. I am making a request to an app that returns a JSON response with product names and descriptions. So far my code looks like what I have below: $curl_connection = curl_init($url); curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, ..