function eStore_handle_new_blog_creation($blog_id, $user_id, $domain, $path, $site_id, $meta) { global $wpdb; if (is_plugin_active_for_network(WP_ESTORE_FOLDER . '/wp_cart_for_digital_products.php')) { $old_blog = $wpdb->blogid; switch_to_blog($blog_id); wp_eStore_run_installer(); switch_to_blog($old_blog); } }
function wp_eStore_run_activation() { global $wpdb; if (function_exists('is_multisite') && is_multisite()) { // check if it is a network activation - if so, run the activation function for each blog id if (isset($_GET['networkwide']) && $_GET['networkwide'] == 1) { $old_blog = $wpdb->blogid; // Get all blog ids $blogids = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}"); foreach ($blogids as $blog_id) { switch_to_blog($blog_id); wp_eStore_run_installer(); } switch_to_blog($old_blog); return; } } wp_eStore_run_installer(); }