Linked variations through REST API
-
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?
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
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.
Yes, you can use the register_meta
option to register all meta fields that you need to be available via REST API.
Kind Regards