Skip to content

Instantly share code, notes, and snippets.

@webtoffee-git
Created December 23, 2025 09:03
Show Gist options
  • Select an option

  • Save webtoffee-git/9361327afd7dd13d869d89f03818c16b to your computer and use it in GitHub Desktop.

Select an option

Save webtoffee-git/9361327afd7dd13d869d89f03818c16b to your computer and use it in GitHub Desktop.
Re-enable admin module in WebToffee import export plugins - By WebToffee( Import export plugin for WooCommerce)
<?php //Do not copy this line of code
add_action('admin_init', 'wt_ier_alter_admin_module_status');
if (!function_exists('wt_ier_alter_admin_module_status')) {
function wt_ier_alter_admin_module_status() {
$module = get_option('wt_iew_admin_modules');
if (!empty($module) && is_array($module)) {
foreach ($module as $mkey => $value) {
if ($value == 0) {
$module[$mkey] = 1;
}
}
update_option('wt_iew_admin_modules', $module);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment