[LYS] Regenerate share key on the fly (#46662)
* Add logic to regenerate the share key if it's not set in LaunchYourStore.php * Add changelog * Use add_option directly
This commit is contained in:
parent
5e7962af67
commit
ea27c1f364
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: enhancement
|
||||
|
||||
Regenerate share key on the fly
|
|
@ -70,6 +70,9 @@ class LaunchYourStore {
|
|||
$is_setting_page = $current_screen && 'woocommerce_page_wc-settings' === $current_screen->id;
|
||||
|
||||
if ( $is_setting_page ) {
|
||||
// Regnerate the share key if it's not set.
|
||||
add_option( 'woocommerce_share_key', wp_generate_password( 32, false ) );
|
||||
|
||||
$settings['siteVisibilitySettings'] = array(
|
||||
'shop_permalink' => get_permalink( wc_get_page_id( 'shop' ) ),
|
||||
'woocommerce_coming_soon' => get_option( 'woocommerce_coming_soon' ),
|
||||
|
|
Loading…
Reference in New Issue