diff --git a/patterns/product-hero.php b/patterns/product-hero.php index 7d50f99dd2d..095b9170f26 100644 --- a/patterns/product-hero.php +++ b/patterns/product-hero.php @@ -4,43 +4,43 @@ * Slug: woocommerce-blocks/product-hero * Categories: WooCommerce */ + +$query = new \WC_Product_Query( + array( + 'limit' => 1, + 'return' => 'ids', + 'status' => array( 'publish' ), + ) +); + +$products = $query->get_products(); +$product_id = $products ? $products[0] : null; ?> - -
- -
- -
-
<?php esc_attr_e( 'Placeholder image used to represent a product being showcased in a hero section.', 'woo-gutenberg-products-block' ); ?>
-
+ + +
+ + - + +
+