WC_Install::maybe_set_store_id()
Set the Store ID if not already present.
Method of the class: WC_Install{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = WC_Install::maybe_set_store_id();
Changelog
Since 8.4.0 | Introduced. |
WC_Install::maybe_set_store_id() WC Install::maybe set store id code WC 9.4.2
public static function maybe_set_store_id() { if ( ! get_option( self::STORE_ID_OPTION, false ) ) { add_option( self::STORE_ID_OPTION, wp_generate_uuid4() ); } }