|
@@ 242-244 (lines=3) @@
|
| 239 |
|
|
| 240 |
|
$product = wc_get_product( $post->ID ); |
| 241 |
|
|
| 242 |
|
if ( ! is_object( $product ) || ! in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), $this->supported_product_types() ) ) { |
| 243 |
|
return; |
| 244 |
|
} |
| 245 |
|
|
| 246 |
|
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; |
| 247 |
|
|
|
@@ 333-335 (lines=3) @@
|
| 330 |
|
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { |
| 331 |
|
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); |
| 332 |
|
|
| 333 |
|
if ( ! in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $_product->product_type : $_product->get_type() ), $this->supported_product_types ) ) { |
| 334 |
|
return false; |
| 335 |
|
} |
| 336 |
|
} |
| 337 |
|
|
| 338 |
|
return true; |
|
@@ 364-366 (lines=3) @@
|
| 361 |
|
|
| 362 |
|
$product = wc_get_product( $post->ID ); |
| 363 |
|
|
| 364 |
|
if ( ! is_object( $product ) || ! in_array( ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $product->product_type : $product->get_type() ), $this->supported_product_types() ) ) { |
| 365 |
|
return; |
| 366 |
|
} |
| 367 |
|
} else { |
| 368 |
|
if ( ! $this->allowed_items_in_cart() ) { |
| 369 |
|
$this->log( 'Items in the cart has unsupported product type ( Apple Pay button disabled )' ); |