Support » Plugin: Google Maps Store Locator for WordPress Plugin – LotsOfLocales » store locator keeps using wp_ as my table prefix

  • Resolved Tonym645

    (@tonym645)


    Hi, I got trouble from hackers on my site and want to change my table prefix, the problem is that store locator keeps using the default prefix (wp_) while the database is changed, it should see this and switch automatic… Right… how can i fix this

    meanwhile i try to conquer this problem, im pretty sure it got something to do with sl-functions.php

    thank u for you time,

    https://wordpress.org/plugins/store-locator/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Tonym645

    (@tonym645)

    Nevermind, solved it..

    if u have this problem,
    change this in sl_define_db_tables()

    $sl_db_prefix = get_option(‘sl_db_prefix’);

    to this
    global $wpdb; $sl_db_prefix = $wpdb->prefix;

    and this in sl_install_tables()

    $sl_db_prefix = get_option(‘sl_db_prefix’);

    to this

    $sl_db_prefix = $wpdb->prefix;

    I hope i have helped u on your way

    Tonym645

    (@tonym645)

    forgot to mark as solved.. πŸ™‚

    Plugin Author Viadat

    (@viadat)

    Delete ‘sl_db_prefix’ entry from “{your_prefix}options” table, and it should re-generate with the proper prefix.

    Tonym645

    (@tonym645)

    Youre right, thnks the database way works great,
    il better use that instead of my override for future updates.

    i should have known that store locator would create an option inside the options table, or better yet what the get_option() function does

    I am quessing i still feel more at home in common php than wordpress

    Thank you for your answer

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘store locator keeps using wp_ as my table prefix’ is closed to new replies.