WordPress.org

Ready to get started?Download WordPress

Forums

Simple Staff List
[resolved] Phone number format ? (5 posts)

  1. rickyspires
    Member
    Posted 1 year ago #

    hello.

    when i put a phone number in the uk format it changes it to usa format.

    for example:

    +44 (0)207 111 2233
    becomes
    440.207.1112233

    this is not good for the uk
    how can i change it please.
    thanks

    http://wordpress.org/extend/plugins/simple-staff-list/

  2. Brett Shumaker
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Ricky,

    Sorry about that. I always forget about non-us phone numbers being different. In trying to make a consistent experience for US users, I've made it unusable for anyone else.

    Here's a quick fix, though, and I'll incorporate a permanent fix in the next version.

    If you're comfortable editing a plugin file, go to simple-staff-list > _inc > admin-save-data.php and edit line 48 which reads:
    update_post_meta($post->ID, "_staff_member_phone", format_phone($_POST["_staff_member_phone"])); //Format the phone number before saving it.

    Change it to:
    update_post_meta($post->ID, "_staff_member_phone", $_POST["_staff_member_phone"]);

    And that should stop formatting your phone numbers. You will need to go correct the ones you've already entered, though. Let me know if you have any trouble doing this and I'll help you get it sorted.

    Again, sorry about that and I'll fix it in the next version of the plugin.

    Thanks!
    Brett

  3. mehlar
    Member
    Posted 1 year ago #

    Nice! Just what I was looking for as well, just at the right time :)

  4. Brett Shumaker
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Mehlar,
    Glad I could help!

  5. rickyspires
    Member
    Posted 1 year ago #

    Thanks for your help.
    That worked fine :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic