• Resolved slydawggiex916

    (@slydawggiex916)


    Using Woocommerce 3.6.1 – when users checkout, the subtotal and total have the entire <span> html tags showing (see screenshot https://prnt.sc/nfup7z).

    <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>1.00</span>

    When I look at the woocommerce php file that has this snippet of code (wc-`formatting-functions.php) I found the below piece of code (https://prnt.sc/nfuprh):
    $formatted_price = ( $negative ? ‘-‘ : ” ) . sprintf( $args[‘price_format’], ‘<span class=”woocommerce-Price-currencySymbol”>’ . get_woocommerce_currency_symbol( $args[‘currency’] ) . ‘</span>’, $price );
    $return = ‘<span class=”woocommerce-Price-amount amount”>’ . $formatted_price . ‘</span>’;

    if ( $args[‘ex_tax_label’] && wc_tax_enabled() ) {
    $return .= ‘ <small class=”woocommerce-Price-taxLabel tax_label”>’ . WC()->countries->ex_tax_or_vat() . ‘</small>’;
    }`

    —–

    Does anybody have thoughts or suggestions as to how to make it so the <span> tags do not show to the user?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter slydawggiex916

    (@slydawggiex916)

    The code in wc-formating-functions.php reads:

    $formatted_price = ( $negative ? ‘-‘ : ” ) . sprintf( $args[‘price_format’], ‘<span class=”woocommerce-Price-currencySymbol”>’ . get_woocommerce_currency_symbol( $args[‘currency’] ) . ‘</span>’, $price );
    $return = ‘<span class=”woocommerce-Price-amount amount”>’ . $formatted_price . ‘</span>’;
    
    if ( $args[‘ex_tax_label’] && wc_tax_enabled() ) {
    $return .= ‘ <small class=”woocommerce-Price-taxLabel tax_label”>’ . WC()->countries->ex_tax_or_vat() . ‘</small>’;
    }

    Hi,

    This kind of problem is usually caused by either a conflict with your theme or with another plugin.
    ?
    The best way to determine this is to:
    ?

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML Tags showing on Checkout/Confirmation Page’ is closed to new replies.