• Resolved babiskalogirou

    (@babiskalogirou)


    Hello dear friends! Thank you for the excellent plugin!

    I would like to know if there is a way to hide the currency symbol ($, €, etc.) when using PRICE in a label.

    Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi,

    Please try to use following code snippet:

    add_filter('awl_label_text_var_value', 'my_awl_label_text_var_value', 10, 4);
    function my_awl_label_text_var_value( $text, $matches, $replacement, $product ) {
        if ( $text && $matches === '{PRICE}' ) {
            $text = AWL_Product_Data::get_price( $product ) ? number_format( AWL_Product_Data::get_price( $product ), wc_get_price_decimals(), wc_get_price_decimal_separator(), wc_get_price_thousand_separator() ) : '';
        }
        return $text;
    }

    You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.

    Regards

Viewing 1 replies (of 1 total)
  • The topic ‘How could i hide the currency symbol?’ is closed to new replies.