'no', 'aisp_custom_payment_method_2_enabled' => 'no', 'aisp_custom_payment_method_3_enabled' => 'no', ); $is_fresh_install = true; foreach ( $default_settings as $option_name => $value ) { // If the option already exists, this is not a fresh install. if ( false !== get_option( $option_name ) ) { $is_fresh_install = false; } else { add_option( $option_name, $value ); } } // Only enable Method 1 by default on a brand-new installation. if ( $is_fresh_install ) { update_option( 'aisp_custom_payment_method_1_enabled', 'yes' ); } } register_activation_hook( __FILE__, 'aispcpm_set_default_settings' );