Skip to content

Commit b44bcb6

Browse files
fix: tooltip icon color
1 parent ac4e282 commit b44bcb6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

classes/plugin.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,8 @@ public function show_tooltip( $description, $meta ) {
10021002

10031003
// Check if the tooltip is enabled.
10041004
if ( isset( $meta['desc_tooltip'] ) && 'on' === $meta['desc_tooltip'] ) {
1005-
$description = ( ! empty( $meta['description'] ) ) ? ' <span data-ppom-tooltip="ppom_tooltip" class="ppom-tooltip" title="' . esc_attr( $input_desc ) . '"><span class="ppom-tooltip-icon"></span></span>' : '';
1005+
$icon_color = ppom_get_option( 'ppom_input_tooltip_iconclr', '#000000' );
1006+
$description = ( ! empty( $meta['description'] ) ) ? ' <span data-ppom-tooltip="ppom_tooltip" class="ppom-tooltip" title="' . esc_attr( $input_desc ) . '"><span class="ppom-tooltip-icon" style="background-color:' . esc_attr( $icon_color ) .'"></span></span>' : '';
10061007
}
10071008
return $description;
10081009
}

templates/frontend/inputs/checkbox.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ function ( $v ) {
5959

6060
$check_wrapper_class = apply_filters( 'ppom_checkbox_wrapper_class', $wrapper_class );
6161
$product_type = $product->get_type();
62+
$icon_color = ppom_get_option( 'ppom_input_tooltip_iconclr', '#000000' );
6263

6364
// change checkbox input form name
6465
// add_filter('ppom_input_name_attr', function($form_name, $meta){
@@ -95,7 +96,7 @@ function ( $v ) {
9596
// if discount price set
9697
if ( $has_discount ) {
9798
$price = $discount_price > 0 ? wc_format_sale_price( $option_price, $discount_price ) : wc_price( $option_price );
98-
$tooltip = $tooltip ? ' <span data-ppom-tooltip="ppom_tooltip" class="ppom-tooltip" title="' . esc_attr( $tooltip ) . '"><span class="ppom-tooltip-icon"></span></span>' : '';
99+
$tooltip = $tooltip ? ' <span data-ppom-tooltip="ppom_tooltip" class="ppom-tooltip" title="' . esc_attr( $tooltip ) . '"><span class="ppom-tooltip-icon" style="background-color:' . esc_attr( $icon_color ) . '"></span></span>' : '';
99100
$the_label = $value['raw'] . $tooltip;
100101
$option_label = '<span class="ppom-cb-label">' . $the_label . '</span><span class="ppom-cb-price">' . $price . '</span>';
101102
}

0 commit comments

Comments
 (0)