Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
Prevent onboarding from running on non-admin pages
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuatf committed Jul 25, 2019
1 parent fea89bb commit 6f9dde5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/features/onboarding/class-wc-admin-onboarding.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public static function get_instance() {
* Hook into WooCommerce.
*/
public function __construct() {
if ( ! is_admin() ) {
return;
}

$this->includes();
add_action( 'woocommerce_components_settings', array( $this, 'component_settings' ), 20 ); // Run after WC_Admin_Loader.
add_action( 'woocommerce_theme_installed', array( $this, 'delete_themes_transient' ) );
Expand Down

0 comments on commit 6f9dde5

Please sign in to comment.