Skip to content

Commit af6c2ff

Browse files
committed
Mockup Generator. Allow passing product options when creating task.
1 parent 3fa8736 commit af6c2ff

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/PrintfulMockupGenerator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ private function parametersToArray(MockupGenerationParameters $parameters)
173173
'files' => $files,
174174
'format' => $parameters->format,
175175
'option_groups' => $parameters->optionGroups,
176+
'product_options' => $parameters->productOptions,
176177
'options' => $parameters->options,
177178
];
178179

src/Structures/Generator/MockupGenerationParameters.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ class MockupGenerationParameters
4949
*/
5050
public $optionGroups = [];
5151

52+
/**
53+
* Key-value list of product options.
54+
* For example, ['stitch_color' => 'white'].
55+
* Depends on the product, available option list can be found here:
56+
* @see https://www.printful.com/docs/products#actionGet
57+
*
58+
* @var array
59+
*/
60+
public $productOptions = [];
61+
62+
5263
/**
5364
* Add a file for a specific placement
5465
*

0 commit comments

Comments
 (0)