Skip to content

Commit

Permalink
Simplify bundle price identification
Browse files Browse the repository at this point in the history
#439 (comment)

Co-authored-by: martynmjones <40762232+martynmjones@users.noreply.github.com>
  • Loading branch information
tomalec and martynmjones authored Jun 18, 2024
1 parent 55ef826 commit 3061687
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-wc-abstract-google-analytics-js.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public function get_formatted_product( WC_Product $product, $variation_id = 0, $
// Integration with Product Bundles.
// Get the minimum price, as `get_price` may return 0 if the product is a bundle and the price is potentially a range.
// Even a range containing a single value.
if ( class_exists( '\WC_Product_Bundle' ) && $product instanceof WC_Product_Bundle && is_callable( [ $product, 'get_bundle_price' ] ) ) {
if ( $product->is_type( 'bundle' ) && is_callable( [ $product, 'get_bundle_price' ] ) ) {
$price = $product->get_bundle_price( 'min' );
}

Expand Down

0 comments on commit 3061687

Please sign in to comment.