mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Fix type
Sometimes this service returns DisabledSmartButton
This commit is contained in:
parent
28e831de0f
commit
f1c91d5508
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ namespace WooCommerce\PayPalCommerce\Blocks;
|
|||
|
||||
use Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry;
|
||||
use WooCommerce\PayPalCommerce\Blocks\Endpoint\UpdateShippingEndpoint;
|
||||
use WooCommerce\PayPalCommerce\Button\Assets\SmartButton;
|
||||
use WooCommerce\PayPalCommerce\Button\Assets\SmartButtonInterface;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Dhii\Container\ServiceProvider;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Dhii\Modular\Module\ModuleInterface;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Interop\Container\ServiceProviderInterface;
|
||||
|
@ -68,7 +68,7 @@ class BlocksModule implements ModuleInterface {
|
|||
array(
|
||||
'data_callback' => function() use ( $c ): array {
|
||||
$smart_button = $c->get( 'button.smart-button' );
|
||||
assert( $smart_button instanceof SmartButton );
|
||||
assert( $smart_button instanceof SmartButtonInterface );
|
||||
|
||||
if ( isset( $smart_button->script_data()['continuation'] ) ) {
|
||||
return array( 'ppcp_continuation' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue