Support » Fixing WordPress » Warning: Illegal string offset ‘slug’

  • I am trying to work with the API and and looking at Postman I see in an article they talk about a v3 of wpapp. So just as matter of interest I go to the rest api url of a local site and I change the version of the rest api from 2 to 3. I get a long list of warnings and I’m wondering is this how it should be? Should it not rather say ‘not found’ instead of printing out warning with variables and paths. Is that not a security risk?

    The warning I get is this:
    Warning: Illegal string offset ‘slug’ in /home/cal/Local Sites/wpsite/app/public/wp-content/plugins/woocommerce/packages/woocommerce-admin/src/API/Reports/PerformanceIndicators/Controller.php on line 149

    http://localhost/mysite/wp-json/wp/v3

Viewing 2 replies - 1 through 2 (of 2 total)
  • There is no v3 of the WordPress REST API. WooCommerce may have a v3 of its API, but the endpoint of that is not wp/v3, it’s wc/v3.

    The errors you’re seeing are unrelated to the WordPress REST API. They seems to be issues with WooCommerce. I recommend asking at https://wordpress.org/support/plugin/woocommerce/ so the plugin’s developers and support community can help you with this.

    Thread Starter calfree

    (@calfree)

    Thanks it’s actually a conflict with the JWT Auth plugin and I posted on their page about it. Apologies for posting in the wrong place

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warning: Illegal string offset ‘slug’’ is closed to new replies.