Fix 24885 currency position RTL

Wrapped price and currency inside a BDI tag, in order to prevent the
bidirectional algorithm to produce confusing results.
This commit is contained in:
Daniel Stanciu 2020-05-11 23:57:13 +03:00
parent 31b648d479
commit 946c342b1d
1 changed files with 1 additions and 1 deletions

View File

@ -582,7 +582,7 @@ function wc_price( $price, $args = array() ) {
}
$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>';
$return = '<span class="woocommerce-Price-amount amount"><bdi>' . $formatted_price . '</bdi></span>';
if ( $args['ex_tax_label'] && wc_tax_enabled() ) {
$return .= ' <small class="woocommerce-Price-taxLabel tax_label">' . WC()->countries->ex_tax_or_vat() . '</small>';