mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Move axo block module loading to the correct place plus some minor PHPCS fixes
This commit is contained in:
parent
47d5874e62
commit
a1ded99f3f
3 changed files with 4 additions and 29 deletions
|
@ -29,7 +29,6 @@ return function ( string $root_dir ): iterable {
|
|||
( require "$modules_dir/ppcp-vaulting/module.php" )(),
|
||||
( require "$modules_dir/ppcp-order-tracking/module.php" )(),
|
||||
( require "$modules_dir/ppcp-uninstall/module.php" )(),
|
||||
( require "$modules_dir/ppcp-axo-block/module.php" )(),
|
||||
( require "$modules_dir/ppcp-blocks/module.php" )(),
|
||||
( require "$modules_dir/ppcp-paypal-subscriptions/module.php" )(),
|
||||
( require "$modules_dir/ppcp-local-alternative-payment-methods/module.php" )(),
|
||||
|
@ -88,6 +87,7 @@ return function ( string $root_dir ): iterable {
|
|||
getenv( 'PCP_AXO_ENABLED' ) === '1'
|
||||
) ) {
|
||||
$modules[] = ( require "$modules_dir/ppcp-axo/module.php" )();
|
||||
$modules[] = ( require "$modules_dir/ppcp-axo-block/module.php" )();
|
||||
}
|
||||
|
||||
return $modules;
|
||||
|
|
|
@ -106,31 +106,6 @@ class AxoBlockModule implements ServiceModule, ExtendingModule, ExecutableModule
|
|||
}
|
||||
);
|
||||
|
||||
// woocommerce_store_api_register_payment_requirements(
|
||||
// array(
|
||||
// 'data_callback' => function() use ( $c ): array {
|
||||
// $smart_button = $c->get( 'button.smart-button' );
|
||||
// assert( $smart_button instanceof SmartButtonInterface );
|
||||
//
|
||||
// if ( isset( $smart_button->script_data()['continuation'] ) ) {
|
||||
// return array( 'ppcp_continuation' );
|
||||
// }
|
||||
//
|
||||
// return array();
|
||||
// },
|
||||
// )
|
||||
// );
|
||||
|
||||
// add_action(
|
||||
// 'wc_ajax_' . UpdateShippingEndpoint::ENDPOINT,
|
||||
// static function () use ( $c ) {
|
||||
// $endpoint = $c->get( 'blocks.endpoint.update-shipping' );
|
||||
// assert( $endpoint instanceof UpdateShippingEndpoint );
|
||||
//
|
||||
// $endpoint->handle_request();
|
||||
// }
|
||||
// );
|
||||
|
||||
// Enqueue frontend scripts.
|
||||
add_action(
|
||||
'wp_enqueue_scripts',
|
||||
|
|
|
@ -68,7 +68,7 @@ class BlocksModule implements ServiceModule, ExtendingModule, ExecutableModule {
|
|||
'woocommerce_blocks_payment_method_type_registration',
|
||||
function( PaymentMethodRegistry $payment_method_registry ) use ( $c ): void {
|
||||
$payment_method_registry->register( $c->get( 'blocks.method' ) );
|
||||
// $payment_method_registry->register( $c->get( 'blocks.advanced-card-method' ) );
|
||||
$payment_method_registry->register( $c->get( 'blocks.advanced-card-method' ) );
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue