Hi Adam,
Thanks for reaching out to us.
We need to do some changes for product page, for example add some additional HTML after some of attributes.
Here are the filter hooks you can use to push your HTML for attributes:
> Dual Color:
– woo_variation_swatches_duel_color_attribute_template
. Example:
add_filter( 'woo_variation_swatches_duel_color_attribute_template', function( $html, $data, $attribute_type, $variation_data ){
return $html .= "<b>Some Text</b>";
}, 10, 4);
> Color:
– woo_variation_swatches_color_attribute_template
. Example:
add_filter( 'woo_variation_swatches_color_attribute_template', function( $html, $data, $attribute_type, $variation_data ){
return $html .= "<b>Some Text</b>";
}, 10, 4);
> Image:
– woo_variation_swatches_image_attribute_template
. Example:
add_filter( 'woo_variation_swatches_image_attribute_template', function( $html, $data, $attribute_type, $variation_data ){
return $html .= "<b>Some Text</b>";
}, 10, 4);
> Button:
– woo_variation_swatches_button_attribute_template
. Example:
add_filter( 'woo_variation_swatches_button_attribute_template', function( $html, $data, $attribute_type, $variation_data ){
return $html .= "<b>Some Text</b>";
}, 10, 4);
> Radio:
– woo_variation_swatches_radio_attribute_template
. Example:
add_filter( 'woo_variation_swatches_radio_attribute_template', function( $html, $data, $attribute_type, $variation_data ){
return $html .= "<b>Some Text</b>";
}, 10, 4);
I hope this will help.
Thank You
Available hooks (add_action) and filters (add_filter) in Pro version
Adam Kutrasiński
Hi, my client have bought Pro version (lifetime licence).
We need to do some changes for product page, for example add some additional HTML after some of attributes.
We need to know about possible hooks (using by add_action) and filters (using by add_filter) in “Variation Swatches Pro” to do it seamlessly.
Unfortunatelly we can’t find it in documentation.