Skip to content

Commit 40792d8

Browse files
committed
fix(uninstall): add comment explaining why branded flag is always cleared
Documents why woocommerce_paypal_branded is deleted outside the full-reset guard, so future contributors understand the intent and do not move it back behind the filter accidentally.
1 parent 892285c commit 40792d8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

uninstall.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@
4242
$general_settings = $app_container->get( 'settings.data.general' );
4343
assert( $general_settings instanceof GeneralSettings );
4444

45+
/**
46+
* Delete the branded flag unconditionally so reinstalling from a different
47+
* source (e.g. WordPress.org) does not silently re-enter branded-only mode.
48+
* Unlike most settings, this flag must be cleared on every uninstall — even
49+
* when the full-reset filter is off — because keeping it prevents merchants
50+
* from ever escaping branded-only mode without direct DB intervention.
51+
*/
4552
delete_option( 'woocommerce_paypal_branded' );
4653

4754
if ( $general_settings->reset_installation_path( 'plugin_uninstall' ) ) {

0 commit comments

Comments
 (0)