Things To Do: Refactor/Clean the REST and Data models

This commit is contained in:
Daniel Dudzic 2025-02-06 14:21:56 +01:00
parent 606c1e27c0
commit 01d4fad717
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
7 changed files with 217 additions and 111 deletions

View file

@ -107,7 +107,7 @@ return array(
return new CommonRestEndpoint( $container->get( 'settings.data.general' ) );
},
'settings.rest.payment' => static function ( ContainerInterface $container ) : PaymentRestEndpoint {
return new PaymentRestEndpoint( $container->get( 'settings.data.payment' ) );
return new PaymentRestEndpoint( $container->get( 'settings.data.payment' ), $container->get( 'woocommerce.logger.woocommerce' ) );
},
'settings.rest.styling' => static function ( ContainerInterface $container ) : StylingRestEndpoint {
return new StylingRestEndpoint(
@ -313,10 +313,4 @@ return array(
$capabilities['google_pay'] && ! $gateways['google_pay'] // Enable Google Pay.
);
},
'settings.rest.reset_dismissed_todos' => static function( ContainerInterface $container ): ResetDismissedTodosEndpoint {
return new ResetDismissedTodosEndpoint();
},
'settings.rest.complete_onclick' => static function( ContainerInterface $container ): CompleteOnClickEndpoint {
return new CompleteOnClickEndpoint();
},
);