WC_Install::enable_analytics_scheduled_import
Set scheduled import mode as the default for new installations.
Uses add_option() which only sets the option if it doesn't already exist. This ensures existing installations are not affected.
Method of the class: WC_Install{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WC_Install::enable_analytics_scheduled_import(): void;
Changelog
| Since 10.5.0 | Introduced. |
WC_Install::enable_analytics_scheduled_import() WC Install::enable analytics scheduled import code WC 10.5.0
public static function enable_analytics_scheduled_import(): void {
// add_option only sets if option doesn't exist, returns false if it already exists.
add_option( 'woocommerce_analytics_scheduled_import', 'yes' );
}