Skip to content

Instantly share code, notes, and snippets.

@nrosella
Created January 8, 2016 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nrosella/293f9f0f617e1b388148 to your computer and use it in GitHub Desktop.
Save nrosella/293f9f0f617e1b388148 to your computer and use it in GitHub Desktop.
add_filter( 'product_type_options', 'custom_product_type_options' );
function custom_product_type_options( $product_type_options ) {
$product_type_options['virtual'][ 'default' ] = 'yes';
$product_type_options['downloadable'][ 'default' ] = 'yes';
return $product_type_options;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment