Support » Plugin: Giftable for WooCommerce » Bug with wpml

  • Resolved Maximus697

    (@maximus697)


    Hi,

    I can not edit a gift category because :

    Fatal error: Uncaught Error: Call to undefined method woocommerce_wpml::instance() in /home/bonbonfa/purvitae/wp-content/plugins/giftable-for-woocommerce/includes/DGFW.php:310

    Stack trace:
    #0 /home/bonbonfa/purvitae/wp-content/plugins/giftable-for-woocommerce/admin/ScreenEditCategory.php(93): DGFW::get_currencies()
    #1 /home/bonbonfa/purvitae/wp-includes/class-wp-hook.php(286): DGFW_ScreenEditCategory->localize_script(Array)
    #2 /home/bonbonfa/purvitae/wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array)
    #3 /home/bonbonfa/purvitae/wp-content/plugins/giftable-for-woocommerce/admin/Admin.php(66): apply_filters(‘dgfw_admin_loca…’, Array)
    #4 /home/bonbonfa/purvitae/wp-includes/class-wp-hook.php(286): DGFW_Admin->enqueue_scripts(‘term.php’)
    #5 /home/bonbonfa/purvitae/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #6 /home/bonbonfa/purvitae/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #7 /home/bonbonfa/purvitae/wp-admin/admin-header.php(97): do_action(‘admin_enqueue_s…’, ‘term.p in /home/bonbonfa/purvitae/wp-content/plugins/giftable-for-woocommerce/includes/DGFW.php on line 310

    thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author DecomTeam

    (@decomteam)

    Hi @maximus697, that looks like WPML, we will investigate and get back to you.
    woocommerce_wpml::instance – for quick fix you could install ‘older’ version of WPML.

    Thread Starter Maximus697

    (@maximus697)

    Hi,

    I find 🙂

    public static function get_currencies()
    {
    global $woocommerce_wpml;

    $currencies = array();
    // first check for WooCommerce Multilingual currencies
    if (class_exists(‘woocommerce_wpml’) && defined(‘WCML_MULTI_CURRENCIES_INDEPENDENT’)) {

    //$woocommerce_wpml = woocommerce_wpml::instance();
    //$woocommerce_wpml_settings = woocommerce_wpml::instance()->get_settings();

    if ($woocommerce_wpml->settings[‘enable_multi_currency’] === WCML_MULTI_CURRENCIES_INDEPENDENT) {

    – Add : global $woocommerce_wpml;
    – Set comment : $woocommerce_wpml = woocommerce_wpml::instance(); and $woocommerce_wpml_settings = woocommerce_wpml::instance()->get_settings();
    – Modify $woocommerce_wpml_settings[‘enable_multi_currency’] —> $woocommerce_wpml->settings[‘enable_multi_currency’]

    It’s work

    Plugin Author DecomTeam

    (@decomteam)

    Thanks @maximus697,
    I talked with devs, they will do more tests and try to release update next week

    Thread Starter Maximus697

    (@maximus697)

    Ok good

    You’re welcome

    Hello there DecomTeam, do you have any new information about update release? Got the same problem with WMPL 4.0.4 and we are unable to edit gift cat. Thanks!

    Plugin Author DecomTeam

    (@decomteam)

    Hi @maximus697, @anilix, todays update should fix editing “Gift categories” , please if you encounter anything report to us, we will be more than happy to fix it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Bug with wpml’ is closed to new replies.