• Thanks very much for developing and sharing this. It has greatly helped me in creating a ‘universal’ cart in a WooCommerce multi-site environment, where only one site is running the shop.

    Seems a few bugs here and there; doesn’t seem to play so nice with WooCommerce API – PHP Client but mostly works perfectly.

    I think a great feature would be to create a route to retrieve ‘cart notices’. So, for example, if a product gets sold out, I can check if there are any cart notices like ‘x has been removed from your cart’, and print those outside of the WooCommerce environment. (This might be better for the WC core rest API.)

    EDIT

    Unfortunately this plugin didn’t seem to work for me in the end. It did not work for me on a clean wordpress/woocommerce install with the official WooCommerce rest API php wrapper library. Only a single cart was ever interacted with. https://github.com/seb86/cart-rest-api-for-woocommerce/issues/31

    Trying to use curl and javascript didn’t work either in a multisite environment because of the complexities of transmitting session/cookie data from a SSO multisite when using the api.

    I think ultimately the key to making this plugin work would be to pass a customer id in a authenticated api call so that the cart in question is not dependent on the complex browser cart session processes going on in native WC, which make a bulletproof cart rest api a complex thing to achieve.

    • This topic was modified 6 years, 5 months ago by 21stcn. Reason: after time using the plugin
    • This topic was modified 6 years, 5 months ago by 21stcn.
    • This topic was modified 6 years, 5 months ago by 21stcn.
Viewing 1 replies (of 1 total)
  • Plugin Author Sébastien Dumont

    (@sebd86)

    Thank you for your feedback @21stcn

    Unfortuantly the CART REST API is designed on how WooCommerce handles the cart. It is not designed to provide anything WooCommerce does not, just as is.

    Maybe once WooCommerce improves multi-site/multi-cart support then I will be able to support it in the future.

    After closly examining the official WC PHP library it appears the credential key and secret are required, which the cart does not need but as WooCommerce does not officially support cart in the REST API there is no way to remove the requirement unless you fork it and made modifications so I will remove the library from the documentation.

    Your welcome to contribute improvements or features via the GitHub repository.

Viewing 1 replies (of 1 total)
  • The topic ‘Great potential but not fully functional’ is closed to new replies.