🎨 Fix code style issues & add comment

This commit is contained in:
Philipp Stracker 2024-11-21 19:39:39 +01:00
parent c7e5395e12
commit a923045eff
No known key found for this signature in database
2 changed files with 9 additions and 4 deletions

View file

@ -15,6 +15,8 @@ use WooCommerce\PayPalCommerce\Button\Endpoint\RequestData;
/**
* Class SwitchSettingsUiEndpoint
*
* Note: This is an ajax handler, not a REST endpoint
*/
class SwitchSettingsUiEndpoint {

View file

@ -88,10 +88,13 @@ class SettingsModule implements ServiceModule, ExecutableModule {
$endpoint = $container->get( 'settings.switch-ui.endpoint' );
assert( $endpoint instanceof SwitchSettingsUiEndpoint );
add_action( 'wc_ajax_' . SwitchSettingsUiEndpoint::ENDPOINT, array(
$endpoint,
'handle_request',
) );
add_action(
'wc_ajax_' . SwitchSettingsUiEndpoint::ENDPOINT,
array(
$endpoint,
'handle_request',
)
);
return true;
}