修改商店页面上显示的Woocommerce店面产品属性

I have a woocommerce storefront theme with some product filters shown next to my product categories on the shop page. It makes sense to show these when products are shown, but not when categories are shown. (i show categories/subcategories first, then products underneath). I would like to be able to hide some of the product filter lists (ie. Size, Color) when the categories / subcategories are shown.

I know there is a hook for this somewhere - i have looked in their documentation and have tried quite a few, but they don't seem to work. Has anybody got some experience in this area of customising a woocommerce storefront theme?

For example: (this does not work)

function sp_attribute_filter(){
_e("it works!");
}

add_filter( 'woocommerce_attribute', 'sp_attribute_filter');

Thanks in advance!