Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- ( function( $ ) {
- $( document ).ready( function() {
- function customPrice( el ) {
- if ( $( 'body' ).hasClass( 'single-product' ) ) {
- var price = el.text(),
- currency = price.substr( price.length - 1 ),
- inter_price = price.slice( 0, -1 ).split( ',' );
- new_price = inter_price[ 0 ] + '<span class="wpc-decimal">' + currency + inter_price[ 1 ] + '</span>';
- el.html( new_price )
- }
- }
- customPrice($( '.wpc-custom-price .price ins .woocommerce-Price-amount.amount' ) );
- } );
- } )( jQuery );
- </script>
Advertisement
Add Comment
Please, Sign In to add comment