WCFM REST API – How to Create Product Associated with Store/Vendor

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Product HUB WCFM REST API – How to Create Product Associated with Store/Vendor

This topic contains 0 replies, has 1 voice, and was last updated by Avatar conle.ydylan 3 months, 2 weeks ago.

  • Author
    Posts
  • #138971
    Avatar
    conle.ydylan
    Participant

    I tried posting this in the REST API section but for whatever reason it tells me I need to log in when I’m already logged in.

    I’m trying to create a product for specific vendor through the REST API but when I do, the store is not linked. I try something like

    {
      "name": "API Product 5",
      "type": "simple",
      "regular_price": "21.99",
      "description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",
      "short_description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.",
      "store": {
            "id": 0,
            "name": "",
            "shop_name": "",
            "url": "https://v3.inourstores.com/store/",
            "address": ""
        }
    }

    But the association is not made. I also tried the URL trick like mymarketplace.com/wp-json/wcfmmp/v1/products/?id=0 with no success.

You must be logged in to reply to this topic.