Last active
October 5, 2020 15:38
-
-
Save mymizan/79367922b69ec6f54bae10162d8452d7 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* change 3,4,5 with your own site IDs where you don't want to sync stock. Each ID | |
* should be seperated by a comma. | |
*/ | |
$site_ids = array( 3, 4, 5); | |
/** | |
* Do not edit anything below. | |
**/ | |
$all_sites = get_sites(); | |
foreach( $all_sites as $site ) { | |
if ( in_array( $site->blog_id, $all_sites) { | |
add_filter('WOO_MSTORE_SYNC/settings/is_stock_sync', '__return_false'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment