mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-03 12:12:25 +08:00
6 lines
348 B
Text
6 lines
348 B
Text
add_filter( 'woocommerce_display_product_attributes', 'wc_exclude_attribute_from_attribute_table', 9999, 2 );
|
|
|
|
function wc_exclude_attribute_from_attribute_table( $product_attributes, $product ) {
|
|
if ( isset( $product_attributes[ 'attribute_pa_color' ] ) ) unset( $product_attributes[ 'attribute_pa_color' ] );
|
|
return $product_attributes;
|
|
}
|