• Resolved Lasha

    (@lashac)


    Hi.

    I use Printful plugin on Woocommerce. It needs Legacy API. So, when it was depricated, Woocomemrce automatically installed plugin for Legacy API.

    Today there was notification that that Legacy API plugin and High Performace Order Storage don’t work together. So, I switched to old version of order storage and now I cant log in to my website, there is a critical error.

    this is the log:
    An error of type E_ERROR was caused in line 111 of the file /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-content/plugins/woocommerce-legacy-rest-api/includes/class-wc-legacy-rest-api-plugin.php. Error message: Uncaught Error: Call to undefined method WC_Legacy_REST_API_Plugin::remove_notice() in /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-content/plugins/woocommerce-legacy-rest-api/includes/class-wc-legacy-rest-api-plugin.php:111
    Stack trace:
    #0 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-content/plugins/woocommerce-legacy-rest-api/includes/class-wc-legacy-rest-api-plugin.php(29): WC_Legacy_REST_API_Plugin::maybe_remove_hpos_incompatibility_admin_notice()
    #1 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-includes/class-wp-hook.php(324): WC_Legacy_REST_API_Plugin::on_woocommerce_init()
    #2 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #3 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-content/plugins/woocommerce/includes/class-woocommerce.php(812): do_action()
    #5 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-includes/class-wp-hook.php(324): WooCommerce->init()
    #6 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #7 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-settings.php(695): do_action()
    #9 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-config.php(68): require_once(‘/home/1166517.c…’)
    #10 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-load.php(50): require_once(‘/home/1166517.c…’)
    #11 /home/1166517.cloudwaysapps.com/ssagpjndzx/public_html/wp-admin/admin-ajax.php(22): require_once(‘/home/1166517.c…’)
    #12 {main}
    ?thrown

Viewing 15 replies - 1 through 15 (of 18 total)
  • Hello @lashac There’s a known bug with Legacy API app. They’re working on a fix. I would revert back to a recent backup. I’m sorry I can’t find the link right now.

    Thank you.

    Thread Starter Lasha

    (@lashac)

    Yes, I restored my backup.

    So, there is an update for Legacy APi plugin and I won’t update it. I also have High-performance order storage (recommended) enabled. If I switch to WordPress posts storage (legacy), it will break the site again.

    When you fix that issue. I need Legacy APi feature because Printful plugin needs it.

    Hello @lashac

    I need Legacy APi feature because Printful plugin needs it

    That is not correct. You can simply use the app to connect directly to Printful avoiding any necessary tokens or API keys.

    Most authors have already updated their apps to work with REST API. In fact I believe Printful is sunsetting their legacy connection as well.

    If you need further information on how to connect the app to your store you can click here.

    Thread Starter Lasha

    (@lashac)

    Yes I use that Printful plugin. And their support said that they will make updates to the plugin in the future. But as I know, it still needs Legacy API feature activated in Woocommerce

    You do not.

    I use the same app and I use HPOS and all is well in the world. They’re maybe just confusing you.

    You can see here I’m running Printful on my own store using REST API. All you need to do is reconnect without using the legacy (if you are even on legacy) on your instance.

    Chances are you probably just have the legacy API box checked. Just uncheck it if you don’t have any apps that require it and you’ll be fine. It will list the apps that need Legacy right there too. If printful shows up there then you are not using the latest app.

    Thread Starter Lasha

    (@lashac)

    @serafinnyc

    You don’t have Legacy API enabled?

    Which version of Woocommerce do you have?

    Mine is 8.8.3 and because Woo removed Legacy API, it automatically installed WooCommerce Legacy REST API plugin, so Legacy API feature is still enabled.

    I have the latest of everything on that instance. I do not have Legacy enabled. You most likely did/do and that’s why the app was automatically added in case you did need it come this June or whenever the deprecation is coming.

    However none of the on demands require Legacy anymore. You can just uncheck the box as I stated above in the one screenshot if no other apps require it. Hopefully you don’t have any. Everyone has pretty much had direct connections for some time now.

    Just check that box, and then you can delete the Legacy API app

    Thread Starter Lasha

    (@lashac)

    No other plugin requires it. I will contact Printful support again and wait for their response.

    Then you’re all set. If you are using Printful’s app then you are directly connected. It adds itself to the REST API.

    Hi there @lashac,

    Just wanted to check in and follow up on the issue, were you able to get assisted by Printful’s support? Do you still any further assistance or was the issue resolved?

    Thread Starter Lasha

    (@lashac)

    They said that I should have Legacy API enabled before they update the plugin.

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @lashac,

    As I understand, you’re trying to work with:

    You need the Legacy REST API as per Printful instructions, but when you enable this plugin with HPOS you get an error, correct? I just tried the Legacy REST API plugin + HPOS and didn’t get an error; so far, so good. I then also installed the Printful plugin but no error whatsoever yet.

    Can you share more details about what you are trying to do when you get this error? I’d love to replicate this issue to learn more.

    Please also share a screenshot of your WooCommerce Settings → Advanced → Rest API and Legacy API.

    In the meantime, I’d like to understand your site properly and what’s causing this crash with the Printful plugin, Legacy REST API and HPOS. Please share with us the necessary information below for us to investigate the issue further:

    • System Status Report?which you can find via WooCommerce > Status > Get system report > Copy for support.
    • Fatal error logs?(if any) under WooCommerce > Status > Logs.

    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    Once we have more information, we’ll be able to assist you further.

    Thanks!
    -OP

    Stef

    (@serafinnyc)

    @lashac I have my own stores and I sell my own artwork using Printful and I am not using anything Legacy. So I think you’re getting bad information from someone. There is no need for Legacy API with Printful.

    Thread Starter Lasha

    (@lashac)

    @omarfpg Hi.

    Website works. I got that error once, when I updated Legacy Plugin. Then I just restored backup and that’s it.

    Stef

    (@serafinnyc)

    Understood @lashac but just know there’s no need for anything legacy related to Printful. I don’t want to confuse others that might see this post and have them think it’s required.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Legacy API Issue’ is closed to new replies.