Code-Snippets-Functions/Execute a function on a child site/WooCommerce/set-marketplace-suggestions-no-by-default.txt
2019-04-10 09:33:38 -06:00

15 lines
440 B
Text

$option_name = 'woocommerce_show_marketplace_suggestions' ;
$new_value = 'no' ;
if ( get_option( $option_name ) !== false ) {
// The option already exists, so we just update it.
update_option( $option_name, $new_value );
} else {
// The option hasn't been added yet. We'll add it with $autoload set to 'no'.
$deprecated = null;
$autoload = 'no';
add_option( $option_name, $new_value, $deprecated, $autoload );
}