I have created a custom product data tab in WooCommere using:
function my_custom_panel(){ ?>
<div class='panel woocommerce_options_panel'>
<?php
woocommerce_wp_text_input(array(
'id' => '_my_custom_data',
'label' => __('Product Support', 'woocommerce'),
));
?>
</div>
<?php }
add_action('woocommerce_product_data_panels', 'my_custom_panel');
Now I'm trying to change its icon/dashicon on the admin screen:
I tried to change the template html-product-data-panel.php
but I can't find the related code to dashicons in the template:
<ul class="product_data_tabs wc-tabs">
<?php foreach (self::get_product_data_tabs() as $key => $tab) : ?>
<li class="<?php echo esc_attr($key); ?>_options <?php echo esc_attr($key); ?>_tab <?php echo esc_attr(isset($tab['class']) ? implode(' ', (array) $tab['class']) : ''); ?>">
<a href="#<?php echo esc_attr($tab['target']); ?>"><span><?php echo esc_html($tab['label']); ?></span></a>
</li>
<?php endforeach; ?>
<?php do_action('woocommerce_product_write_panel_tabs'); ?>
</ul>
Is there any special hook for this? How can I add a custom icon like the other tabs to my custom tab?
Any help would be appreciated.