public function MailchimpEcommerce::addProductVariant in Mailchimp 8
Add a variant to a product.
Parameters
string $store_id: The store id.
string $product_id: The id for the product of a store.
array $parameters: Array of variant information.
Return value
object The API product response object.
Throws
\Mailchimp\MailchimpAPIException
See also
http://developer.mailchimp.com/documentation/mailchimp/reference/ecommer...
File
- lib/
mailchimp-api-php/ src/ MailchimpEcommerce.php, line 914
Class
- MailchimpEcommerce
- Mailchimp Ecommerce library.
Namespace
MailchimpCode
public function addProductVariant($store_id, $product_id, $parameters = []) {
$tokens = [
'store_id' => $store_id,
'product_id' => $product_id,
];
return $this
->request('POST', '/ecommerce/stores/{store_id}/products/{product_id}/variants', $tokens, $parameters);
}