Home Forums WoodMart support forum Linked variations through REST API

Linked variations through REST API

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #490627

    ivan-7028
    Participant

    I want to create/update/delete linked variations through REST API. Is it already somehow enabled? I found the woodmart_woo_lv post type, and the 3 private meta fields for it which seem to define it. When I register_meta them and add the support for custom fields for the post type in REST API would it completely and safely solve my use case?

    #490668

    Artem Temos
    Keymaster

    Hello,

    This post type is registered and available in REST API as any other post type. You can use it according to WordPress documentation.

    Kind Regards

    #490738

    ivan-7028
    Participant

    Hi,
    thanks. That is correct for the post type itself, I managed to create a record in wp_posts table, but the corresponding records in wp_postmeta with the list of product IDs and the linked variation attribute, which I found are created with meta_key:

    • _woodmart_linked_products
    • _woodmart_linked_attrs
    • _woodmart_linked_use_product_image

    are not created when posting to that endpoint.

    • This reply was modified 1 year, 11 months ago by ivan-7028.
    • This reply was modified 1 year, 11 months ago by ivan-7028.
    #490742

    Artem Temos
    Keymaster

    Yes, you can use the register_meta option to register all meta fields that you need to be available via REST API.

    Kind Regards

Viewing 4 posts - 1 through 4 (of 4 total)