mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Merge pull request #3603 from woocommerce/PCP-5047-branded-only-mode-not-entered-when-installing-plugin-via-payments-tab
Remove redundant double action
This commit is contained in:
commit
7453207e17
1 changed files with 0 additions and 20 deletions
|
@ -199,26 +199,6 @@ class SettingsModule implements ServiceModule, ExecutableModule {
|
|||
&& update_option( SwitchSettingsUiEndpoint::OPTION_NAME_SHOULD_USE_OLD_UI, 'yes' )
|
||||
);
|
||||
|
||||
/**
|
||||
* This hook is fired when the plugin is installed or updated.
|
||||
*/
|
||||
add_action(
|
||||
'woocommerce_paypal_payments_gateway_migrate',
|
||||
function () use ( $container ) {
|
||||
$path_repository = $container->get( 'settings.service.branded-experience.path-repository' );
|
||||
assert( $path_repository instanceof PathRepository );
|
||||
|
||||
$partner_attribution = $container->get( 'api.helper.partner-attribution' );
|
||||
assert( $partner_attribution instanceof PartnerAttribution );
|
||||
|
||||
$general_settings = $container->get( 'settings.data.general' );
|
||||
assert( $general_settings instanceof GeneralSettings );
|
||||
|
||||
$path_repository->persist();
|
||||
$partner_attribution->initialize_bn_code( $general_settings->get_installation_path() );
|
||||
}
|
||||
);
|
||||
|
||||
// Suppress WooCommerce Settings UI elements via CSS to improve the loading experience.
|
||||
$loading_screen_service = $container->get( 'settings.services.loading-screen-service' );
|
||||
assert( $loading_screen_service instanceof LoadingScreenService );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue