Skip to content

Commit

Permalink
feat!: Deprecate timber/integration/woocommerce/product filter in fav…
Browse files Browse the repository at this point in the history
…or of timber/woocommerce/product (#50)
  • Loading branch information
gchtr committed Sep 10, 2024
1 parent 944e8fe commit 3019a77
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,22 @@ public static function build( WP_Post $wp_post): static {
$product = wc_get_product( $post->ID );
}

$product = apply_filters_deprecated(
'timber/integration/woocommerce/product',
[ $product, $post ],
'1.1.0',
'timber/woocommerce/product'
);

/**
* Filters the WooCommerce product
* Filters the WooCommerce product.
*
* @since 1.1.0
*
* @param \WC_Product $product The WooCommerce product.
* @param \WP_Post $post The WordPress post.
*/
$product = apply_filters( 'timber/integration/woocommerce/product', $product, $post );
$product = apply_filters( 'timber/woocommerce/product', $product, $post );

$post->product = $product;

Expand Down

0 comments on commit 3019a77

Please sign in to comment.