$q
should contain the array:
add_filter( 'woocommerce_product_related_posts', 'woo_custom_attribute_filter', 10, 1 );
function woo_custom_attribute_filter( $q ) {
$q = array( /* args here */ );
return $q;
}
$q
should contain the array:
add_filter( 'woocommerce_product_related_posts', 'woo_custom_attribute_filter', 10, 1 );
function woo_custom_attribute_filter( $q ) {
$q = array( /* args here */ );
return $q;
}