Categories
CMS Mastering Development Wordpress

WooCommerce with ACF: custom fields per product variation

I’m a little stuck here. So I have variable products and I need to show the output of a custom field in a custom tab. So I created a new field in ACF, called ‘test’. I’ve got this to work for the product itself, but the content does not change when I select another variable. […]

Categories
CMS Mastering Development Wordpress

adding custom tab for specific product type in woocommerce 4.4.1

Based on this code, I want to create custom tab for just variable products in Woocommerce, but unfortunately, this custom tab is added to all product types, is it any way to solve this problem? if I am wrong please correct me. add_filter( ‘woocommerce_product_tabs’, ‘woo_new_product_tab’ ); function woo_new_product_tab( $tabs ) { // Adds the new […]

Categories
CMS Mastering Development Wordpress

Woocommerce New Tab Content with multiple meta data value

I created the new tab in woo-commerce & I would like to add the following custom-fields/meta-data in this tab. It only outputs first four values. Tried these as well, need help. // Display the value of custom product text field echo get_post_meta($post->ID, ‘_custom_product_text_field’, true); // Display the value of custom product number field echo get_post_meta(get_the_ID(), […]

Categories
Development

How to add a hook that adds a new tabs based on the word in the product title

I want them to add tabs to the product with a description based on the word in the product title I already have something created but based on tags but I don’t know how to do that to add tabs based on the word in the title add_filter( ‘woocommerce_product_tabs’, ‘woo_new_product_tab’ ); function woo_new_product_tab( $tabs ) […]

Categories
Development

findOneAndUpdate for nested object elements of an array with two conditions

I want to update “displayTitle” to “12345” where objectId is “5d8c8f4a4449a851f6kkk6o2” under “title” of topten= “under 50000” findOneAndUpdate for nested object elements of an array with two conditions, first for selecting the specific document and the second one to find the specific object in the nested array. Collection Name is : topten. > db.topten.find().pretty(); { […]

Categories
Development WooCommerce Wordpress

How to move a custom added tab(say x) under ‘description’ tab in a single product page in woocommerce

I have added a custom tab called ‘Expert Review’ beside my description tab into the product page. Now I want to move this expert review tab to show under the description tab. I have tried this to do this: // Remove tab add_filter( ‘woocommerce_product_tabs’, function( $tabs ) { unset( $tabs[‘Expert Review’] ); return $tabs; }, […]