• Resolved kevinm21

    (@kevinm21)


    Version: 1.5.1
    Hi – Thank you for your plug-in.

    I need to update the data in wp_SH_CD_SHORTCODES table, rather than from Worpress Admin area.

    While saving variables in WordPress everything works fine.

    But if I revise the data in SQL wp_SH_CD_SHORTCODES table, the data change is not updated/reflected in the wordpress page.

    I do see the change made in SQL table in Shortcode Variables, admin area. By re-Saving the newly updated data in Admin area, the change gets reflected in the WordPress page.

    Any way to fix this?

    https://www.ads-software.com/plugins/shortcode-variables/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author YeKen

    (@aliakro)

    Ah ok… to save hitting the database every time a shortcode is rendered, I cache the result.So, modifying the data directly is fine however the cache would need to be cleared for each shortcode i.e. that way it looks it up again from the database.

    There is actually no way to do this via the admin panel as I never intended for someone to update the database directly.So you have two options really:

    1) If you’re doing your changes via PHP you could always look at calling my function:

    sh_cd_delete_cache($key)

    2) Reduce caching time for the plugin (not recommended) – at the moment the shortcode is cached upto an hour. You could reduce this to something like 5 minutes… you can change this in globals.php by editing the value of SH_CD_CACHING_TIME

    Out of interest, why do you edit the table directly? I ask in case it’s a feature I could add to the plugin.

    If you haven’t already, please review the plugin ??

    Thread Starter kevinm21

    (@kevinm21)

    Thank you for your prompt reply and information.

    Since there are a lot of data, it does not make sense to input them one at a time, so I use direct SQL update.

    Plugin Author YeKen

    (@aliakro)

    Ah ok… would a CSV import tool be a useful feature?

    Thread Starter kevinm21

    (@kevinm21)

    Absolutely. Thank you.

    Plugin Author YeKen

    (@aliakro)

    Maybe something for a future release ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Database table direct edit’ is closed to new replies.