Woocommerce custom field search in custom post type [closed]
Woocommerce custom field search in custom post type [closed]
Woocommerce custom field search in custom post type [closed]
Creating custom permalink tags for WooCommerce
Show only one variaton in catalog on meta key
Finally I got it working with next code: $product = wc_get_product($productId); $attrName=”my_attribute”; $attrValue=”some value” $attr = new WC_Product_Attribute(); $attr->set_name( $attrName ); $attr->set_options( [$attrValue] ); $attr->set_visible(1); $attr->set_variation(1); $attr->set_position(0); $attr->set_id( 0 ); $attrs[$attrName] = $attr; $product->set_attributes($attrs); $product->save();
Replacing products on Woocommerce Product Category with Search Results from SearchWP [closed]
WooCommerce specifc variations for specific user role [closed]
Set default value field meta_Value [closed]
This is a filter. It should return value, not render HTML/CSS/JS inside. For your color change, why didn’t you override the template file. eg: woocomerce\single-product\add-to-cart\simple.php
Copy js file to: wp-content/themes/child-storefront-theme/assets/js/woo-related-products-refresh-on-reload/woo-related-products-public.js function custom_woo_related_products() { wp_dequeue_script(‘woo-related-products’); wp_enqueue_script(‘custom-woo-related-products’, get_stylesheet_directory_uri().’/assets/js/woo-related-products-refresh-on-reload/woo-related-products-public.js’, array(‘jquery’)); } add_action(‘wp_enqueue_scripts’, ‘custom_woo_related_products’, 100); Why 100? To be dequeued, the script must have been enqueued. Attempting to dequeue a script before the script is enqueued will have no effect.
StoreFront product pages: Turn the Short Description section into a kindred tab section [closed]