Giter Site home page Giter Site logo

Comments (2)

jasonknight avatar jasonknight commented on September 26, 2024

The API logs the API user in. Which would mess up the current session for the actual user. This is essentially what was happening to some users of the API.

The restriction could theoretically be removed. i.e. if the current user is logged in, it could just do things as that user...However, the API was designed for 3rd party apps to connect to Woo... Like from another server. Not on the same server/same page.

To remove the restriction, just comment out the 2 returns in template_redirect, and then in class-wc-json-api we need to modify logUserIn.

from woocommerce-json-api.

jasonknight avatar jasonknight commented on September 26, 2024

I have noticed a growing desire for people to use the api for some kinds of widgets on the page, as it avoids having to deal with messy WP Ajax and plugin stuff.

I am very open to removing this restriction.

from woocommerce-json-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.