The add-on renders a description panel and a tooltip on the choice's info icon. It exposes two hooks of its own, and participates in one core hook.
See the hook reference index for how to register PHP and JavaScript callbacks.
PHP filters
| Hook | Arguments | Purpose |
|---|---|---|
mkl_pc/advanced_description/icon | $icon | The SVG markup for the "show more information" icon |
JavaScript filters
| Hook | Arguments | Purpose |
|---|---|---|
PC.fe.advanced-description.tooltip.options | options, view | Tippy.js options for the info-icon tooltip |
mkl_pc/advanced_description/icon
Filters the icon markup printed into the description template. The default references the
plugin's sprite (#mkl-icon-info); return any markup you like, including an <img>.
add_filter( 'mkl_pc/advanced_description/icon', function ( $icon ) { return '<span class="dashicons dashicons-info"></span>';} );
PC.fe.advanced-description.tooltip.options
The tooltip is Tippy.js, and this filter receives its full options object just before the instance is created. The second argument is the choice view.
Note the ordering: the add-on first runs the core PC.fe.tooltip.options filter, then this one.
Use this hook when you want to change the description tooltip only, and the core hook when you
want every configurator tooltip to match.
wp.hooks.addFilter( 'PC.fe.advanced-description.tooltip.options', 'my-plugin/adv-desc', function ( options, view ) { options.placement = 'right'; options.delay = [ 300, 0 ]; return options; });
If options.content comes back empty, no tooltip is created at all — returning an empty string
is the way to suppress one.
Core hooks it also fires
PC.fe.tooltip.options — see the
Product Configurator JavaScript hooks.