function affiliate_wp_check_if_installed() { // this is mainly for network activated installs if (!get_option('affwp_is_installed')) { affiliate_wp_install(); } }
<?php $_tests_dir = getenv('WP_TESTS_DIR'); if (!$_tests_dir) { $_tests_dir = '/tmp/wordpress-tests-lib'; } require_once $_tests_dir . '/includes/functions.php'; function _manually_load_plugin() { require dirname(__FILE__) . '/../affiliate-wp.php'; } tests_add_filter('muplugins_loaded', '_manually_load_plugin'); require $_tests_dir . '/includes/bootstrap.php'; activate_plugin('affiliate-wp/affiliate-wp.php'); // Install AffiliateWP affiliate_wp_install();