Skip to content
Public Ticket #30701

Hook Help

Conversation thread

PenciDesign Supporter replied

Staff Reply

Hi,

Why do you need to add PHP code when we’ve already provided an option to remove it? This option will remove all the swatches you want on the product archive page.

Please go to Appearance → Customize → WooCommerce → Shop Settings → Grid Swatch Attribute to Display, and clear all product attributes in this field.

If you still prefer to remove it using PHP, here is the code:

remove_all_actions( 'penci_swatches_loop' );

However, please note that some functions of Soledad and WooCommerce may not work properly if you use this code instead of modifying it via the theme options.

Regards,
PenciDesign.

Mr Hung replied

Customer Reply

As you can see in the picture, I have removed most of the HOOKs in the product category page, there are only 2 HOOKs left: product category and product attributes that I have not been able to remove.

PenciDesign Supporter replied

Staff Reply

Hi,

Please send me a screenshot of the area you want to remove.

Regards,
PenciDesign.

Mr Hung replied

Customer Reply

I don't intend to delete the attribute field data, I just intend to rewrite the display through HOOKs

PenciDesign Supporter replied

Staff Reply

Hi,

Please follow the instructions in my latest reply.

Regards,
PenciDesign.

Mr Hung replied

Customer Reply

I got your remove HOOK command but it doesn't work, it seems you are using a different HOOK

PenciDesign Supporter replied

Staff Reply

Hi,

Please go to Appearance → Customize → WooCommerce → Shop Settings → Grid swatch attribute to display: clear all the product attributes on this option field.

Regards,
PenciDesign.

Mr Hung started the conversation

Conversation Start

I am rewriting the product category page, but I don't know what hooks you are using on images and product attributes (e.g. product has Color attribute). Can you please let me know the Hooks you are using so I can remove and rewrite?

Want to join this conversation or access attachments? Sign in first.