Created
December 17, 2019 01:50
-
-
Save helgatheviking/e3424f7d64daefd4b48809bdcdba73b2 to your computer and use it in GitHub Desktop.
Disable Cost of Goods Compat Module in Mix and Match
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Disable Cost of Goods Compat Module in Mix and Match | |
* Plugin URI: https://woocommerce.com/ | |
* Description: Disable Cost of Goods Compat Module in Mix and Match | |
* Version: 1.0.0 | |
* Author: Kathy Darling | |
* Author URI: http://kathyisawesome.com/ | |
* Requires at least: 5.3.0 | |
* Tested up to: 5.3.0 | |
* | |
* WC requires at least: 3.8.0 | |
* WC tested up to: 3.8.0 | |
* | |
* Copyright: © 2019 Kathy Darling | |
* License: GNU General Public License v3.0 | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
*/ | |
// Exit if accessed directly. | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
/** | |
* Disable the Cost of Good compat module. | |
* | |
* @param array $modules | |
* @return array | |
*/ | |
function kia_disable_mnm_modules( $modules ) { | |
unset( $modules['cog'] ); | |
return $modules; | |
} | |
add_filter( 'wc_mnm_compatibility_modules', 'kia_disable_mnm_modules' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment