Best Multi Vendor Marketplace Plugin for WordPress › Forums › WCFM – Ultimate › Visible on the product page
- This topic has 5 replies, 2 voices, and was last updated 8 years, 1 month ago by
WCFM Forum.
Viewing 5 reply threads
- AuthorPosts
- February 11, 2018 at 10:56 am #18929
Alice
GuestIs there a way to make all attributes have the Visible on the product page clicked by default – as many vendors wont think to click it.
Or even better, remove the option to have a click box and have it to default that all attributes are visible if they are active?
Thanks
- February 11, 2018 at 2:28 pm #18950
WCFM Forum
MemberHI,
Both are possible to achieve using this filter – product_simple_fields_custom_attributes
Please know me if you required any further assistance in this.
Thank You
- February 13, 2018 at 5:37 pm #19042
Alice
GuestThis reply has been marked as private. - February 13, 2018 at 8:02 pm #19051
WCFM Forum
MemberOk, I will send you code for the purpose and you just have to add your child theme’s functions.php
Thank You
- February 15, 2018 at 7:43 am #19146
Alice
GuestThis reply has been marked as private. - February 15, 2018 at 8:43 am #19147
WCFM Forum
MemberHi,
Here is the code for your purpose –
function product_simple_fields_custom_attributes_manipulate( $select_attributes ) { if( isset( $select_attributes['select_attributes'] ) && isset( $select_attributes['select_attributes']['value'] ) ) { $attribute_values = $select_attributes['select_attributes']['value']; $attribute_custom_values = array(); if( !empty( $attribute_values ) ) { foreach( $attribute_values as $key => $attribute_value ) { $attribute_value['is_active'] = 'enable'; $attribute_custom_values[$key] = $attribute_value; } } $select_attributes['select_attributes']['value'] = $attribute_custom_values; } return $select_attributes; } add_filter( 'product_simple_fields_custom_attributes', 'product_simple_fields_custom_attributes_manipulate' );Thank You
- AuthorPosts
Viewing 5 reply threads
- The topic ‘Visible on the product page’ is closed to new replies.