[WC] Check the attributes visibility checkbox on frontend by default

To set the Visible on the product page an attribute by default, add the following snippet to wp-content/themes/[theme]/functions.php at the end of the file.

 

function yit_default_attribute_visibility( $bool ) {
    $bool = true;
    return $bool;
}
add_filter( 'default_attribute_visibility', 'yit_default_attribute_visibility' );
Was this article helpful?
0 out of 0 found this helpful

Back to Help Center

Powered by Zendesk