Display japanese yen.

This topic contains 4 replies, has 2 voices, and was last updated by  Tsuguto 4 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35723

    Please tell me how to display japanese yen exactly.
    I want to disappear decimal point.
    (ex: ¥500.00 >>> ¥500)

    Tsuguto
    #35727

    Hi Tsuguto,

    You can do the following.

    add_filter( 'eventorganiser_format_price', function($formatted, $price){
        return preg_replace('/\.\d{1,2}$/', '', $formatted);
    }), 10, 2);
    

    Please note, that in version 3.0.0 (due to be released next month), this won’t be necessary.

    Stephen Harris
    #35731

    Thank you for advice. I can solve this problem.
    But total amount have 2nd decimal place .
    Please tell me advice.

    Tsuguto
    #35737

    Hi Tsuguto,

    Apologies, this is a bug in the occurrence-picker.js script also. You can fix it there, but you would need to update the occurrence-picker.min.js file which is a minified copy that is used in production environments. You could do that by minifying the updated occurrence-picker.js or by just replacing the content of the minified file which the content of the occurrence-picker.js file.

    Specifically, in lines 716 and 725, replace the second argument passed to eventorganiserpro.toFixed from 2 to 0.

    Event Organiser 3.0 will be aware of zero-decimal currencies so these issues should be fixed in that release. Apologies for the inconvenience.

    Stephen Harris
    #35778

    Thank you for advice.
    I’m looking forward to released Event Organiser 3.0.

    Tsuguto
Viewing 5 posts - 1 through 5 (of 5 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.