Skip to content

Commit

Permalink
Use a fixed SKU number when creating an adapted product
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkamp authored and joemcgill committed Aug 27, 2024
1 parent b3e838f commit 1dd12f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/Tools/HelperTrait/ProductTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,12 @@ protected function generate_mock_image_attachment( int $product_id, string $imag
* @return WCProductAdapter The adapted products with the rules applied.
*/
protected function generate_attribute_mapping_adapted_product( $rules, $categories = [] ) {
$product = WC_Helper_Product::create_simple_product( false );
$product = WC_Helper_Product::create_simple_product(
false,
[
'sku' => 'Mapped Product SKU',
]
);

$attributes = [
WC_Helper_Product::create_product_attribute_object( 'size', [ 's', 'xs' ] ),
Expand Down

0 comments on commit 1dd12f0

Please sign in to comment.