Hi, just to be clear, you are talking about extensions on the product details page, is that correct?
After investigating, I confirmed that the presence of the variant id depends on which page you are.
Detailed behaviors of these extension points were implemented as follows:
- Product admin page e.g. [https://example.myshopify.com/admin/products/12345](https://example.myshopify.com/admin/products/12345`)
- Admin::Product::SubscriptionPlan::Edit:
- sellingPlanGroupId : the SellingPlanGroup id of the group being edited
- productId : the product id of the current product admin page
- variantId : the variant id is null
- Admin::Product::SubscriptionPlan::Create:
- productId : the product id of the current product admin page
- variantId : the variant id is null
- Admin::Product::SubscriptionPlan::Remove:
- sellingPlanGroupId : the SellingPlanGroup id of the group being removed from the product
- productId : the product id of the current product admin page - variantId : the variant id is null
- variantIds : an array of the product’s child variant ids for which we should also remove the selling plan group association
- Admin::Product::SubscriptionPlan::Add:
- productId : the product id of the current product admin page
- variantId : the variant id is null
- Variant admin page e.g. [https://example.myshopify.com/admin/products/12345/variants/6789](https://example.myshopify.com/admin/products/12345/variants/6789`)
- Admin::Product::SubscriptionPlan::Edit:
- sellingPlanGroupId : the SellingPlanGroup id of the group being edited
- productId : the product id of the parent product
- variantId : the variant id of the current variant admin page
- Admin::Product::SubscriptionPlan::Create:
- productId : the product id of the parent product
- variantId : the variant id of the current variant admin page
- Admin::Product::SubscriptionPlan::Remove:
- sellingPlanGroupId : the SellingPlanGroup id of the group being removed from the variant
- productId : the product id of the parent product
- variantId : the variant id of the current variant admin page
- variantIds : this will be empty because the variant has no “child” variants
- Admin::Product::SubscriptionPlan::Add:
- productId : the product id of the parent product
- variantId : the variant id of the current variant admin page
We also realized that this information is not documented anywhere. We will update the page accordingly.
Hope this helps!