Jump to content
Sign in to follow this  
Pixrael

Woocommerce REST API can be cloned?

Recommended Posts

I have a technical question that maybe you can guide me to a solution/idea.

I know an online tool that publishes product information and updates prices/inventories regularly from marketplaces such as Amazon, Ebay, etc. to a Wordpress website ... can get the orders information, auto-order it and send back the tracking numbers. All this is done through the Woocommerce API. They don't have an API or CSV option to access this features..

Is it possible to create fake REST endpoints (a clone of WooCommerce) on my site to accept requests from that external website and process this data my way inside PW? The requests to a REST endpoint are POST like in regular forms submits?

Sorry I don't have to much technical background about this

Share this post


Link to post
Share on other sites
4 hours ago, clsource said:

Another option is to create a "Fake Woocommerce" site and use PW inside their handlers
in order to save the data into PW.

This is a solution I was thinking about at the beginning, but it could be very complex for me ... maybe I'll install WP + WC in a subdomain to act as a "router" and then I can connect to the WC API to get/put information the exact information I'll need about prices, inventory and orders ... it's crazy, but I need that tool, so I need to be creative 🙂

Thanks for you response

Share this post


Link to post
Share on other sites
38 minutes ago, Pixrael said:

but I need that tool,

What tool is that, btw?

Share this post


Link to post
Share on other sites

is Shopmaster ... by the way yesterday I bought a license for Padloper .. and I'll be ready for the new version 😉

  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, Pixrael said:

This is a solution I was thinking about at the beginning, but it could be very complex for me ... maybe I'll install WP + WC in a subdomain to act as a "router" and then I can connect to the WC API to get/put information the exact information I'll need about prices, inventory and orders ... it's crazy, but I need that tool, so I need to be creative 🙂

Thanks for you response

well you can always read the database directly

or use the wordpress rest api 🙂

  • Thanks 1

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By SwimToWin
      As an admin I want to use the API to ask if a page is published - using the $page->isPublished() method - so that I know it's published - as opposed to unpublished or trashed pages. That includes hidden pages.
      This method will correspond to Settings -> Status when editing pages:

      (Published is also mentioned explicitly where the edit page says "Published on [?]".)
      I would expect the API - and specifically the $page->hasStatus() method - to ask if a page has status published.
      But as I can see, it's only possible to ask for exceptions such as isUnpublished() and isHidden().
      <?php // This fails with "Fatal Error: Uncaught Error: Undefined class constant 'statusPublished'" if($page->hasStatus(Page::statusPublished)) { echo 1; } ?> PS: My current use case is that I want to count number of published vs. unpublished pages. I can only do that by getting all pages (include=all), then subtract any unpublished pages.
    • By ngrmm
      My clients wants a modal to show up on every page. But when a user clicks inside the modal -> a session-cookie is set and the modal gets a class.
      // user clicks on modal button $('.modal_button').click(function(){ // 1. set PW session cookie // 2. toggle class $('.modal').toggleClass('off'); }); I know how to set a cookie on page-load via PW-API. But the click on the modal button does not force a page-load. So i have to set the cookie through javascript. Is there a way to do that?
    • By VeiJari
      Hello,
      I'm trying to create a page via api and populate values to it. I can populate everything except user pages to a page reference array.
      Code: 
      $dataUsers = $data->project->users; foreach($dataUsers as $dataUser) { $newProject->projectUsers->add(wire()->pages->find('template=user, id=' . $dataUser->id)); } I'm receiving my data via JSON.
      Is there something I'm missing?
      Thanks for help
    • By VeiJari
      Hi, this is the first we are trying to make a page that has only one type of user that has access to every page. 
      The other users should only have a given access to specific pages, not to the whole template.
      My structure
      -Field -Organisation -Project -Report I want that the "measurer" role only has access to "project x" and it's children, but no view access to every project, organisation or field. I've tried to do this with https://modules.processwire.com/modules/page-edit-per-user/ but it still needs a view access to the whole tree to see the "project x" page. Or is there something I haven't figured out?
      Maybe I have to make it via the API: a select field in the "organisation" template where the admins could add the users and then I use hook to update the privileges?
      Have you done something like this and how did you accomplish it?
      Any help would be appreciated.
       
    • By clsource
      Hello, I finished this toy project. A simple API to show data for Chilean Birds.
      Used to flex my PW and React muscles, since a lot of time has passed since making something with those techs.
       

      Code: https://github.com/NinjasCL/chileanbirds-api
      Frontend (React): https://aves.ninjas.cl
      Backend (PW): https://aves.ninjas.cl/api
      Hope you like it 🙂

      Thanks.
       
       
×
×
  • Create New...