migrate settings from webhook status page

This commit is contained in:
Narek Zakarian 2022-08-31 16:12:16 +04:00
parent 9ea7949154
commit 35909503b6
8 changed files with 52 additions and 85 deletions

View file

@ -15,11 +15,11 @@ use Exception;
use Interop\Container\ServiceProviderInterface;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
use WooCommerce\PayPalCommerce\WcGateway\Settings\Settings;
use WooCommerce\PayPalCommerce\Webhooks\Endpoint\ResubscribeEndpoint;
use WooCommerce\PayPalCommerce\Webhooks\Endpoint\SimulateEndpoint;
use WooCommerce\PayPalCommerce\Webhooks\Endpoint\SimulationStateEndpoint;
use WooCommerce\PayPalCommerce\Webhooks\Status\Assets\WebhooksStatusPageAssets;
use WooCommerce\PayPalCommerce\Webhooks\Status\WebhooksStatusPage;
/**
* Class WebhookModule
@ -112,9 +112,8 @@ class WebhookModule implements ModuleInterface {
);
$page_id = $container->get( 'wcgateway.current-ppcp-settings-page-id' );
if ( WebhooksStatusPage::ID === $page_id ) {
$GLOBALS['hide_save_button'] = true;
$asset_loader = $container->get( 'webhook.status.assets' );
if ( Settings::CONNECTION_TAB_ID === $page_id ) {
$asset_loader = $container->get( 'webhook.status.assets' );
assert( $asset_loader instanceof WebhooksStatusPageAssets );
add_action(
'init',