|
@@ 267-269 (lines=3) @@
|
| 264 |
|
|
| 265 |
|
$product = wc_get_product( $post->ID ); |
| 266 |
|
|
| 267 |
|
if ( ! is_object( $product ) || ! in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), $this->supported_product_types() ) ) { |
| 268 |
|
return; |
| 269 |
|
} |
| 270 |
|
|
| 271 |
|
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; |
| 272 |
|
|
|
@@ 359-361 (lines=3) @@
|
| 356 |
|
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { |
| 357 |
|
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); |
| 358 |
|
|
| 359 |
|
if ( ! in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $_product->product_type : $_product->get_type() ), $this->supported_product_types() ) ) { |
| 360 |
|
return false; |
| 361 |
|
} |
| 362 |
|
} |
| 363 |
|
|
| 364 |
|
return true; |
|
@@ 390-392 (lines=3) @@
|
| 387 |
|
|
| 388 |
|
$product = wc_get_product( $post->ID ); |
| 389 |
|
|
| 390 |
|
if ( ! is_object( $product ) || ! in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), $this->supported_product_types() ) ) { |
| 391 |
|
return; |
| 392 |
|
} |
| 393 |
|
} else { |
| 394 |
|
if ( ! $this->allowed_items_in_cart() ) { |
| 395 |
|
$this->log( 'Items in the cart has unsupported product type ( Apple Pay button disabled )' ); |