Created
July 13, 2017 23:02
-
-
Save marcelotorres/29f4f4f9551d17db7b12ff59d33ad56c to your computer and use it in GitHub Desktop.
WooCommerce - Customizar as opções de tipos de produtos
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 | |
function custom_admin_product_option($options){ | |
$options = array( | |
'virtual' => array( | |
'id' => '_virtual', | |
'wrapper_class' => 'show_if_simple', | |
'label' => __( 'Virtual', 'woocommerce' ), | |
'description' => __( 'Virtual products are intangible and aren\'t shipped.', 'woocommerce' ), | |
'default' => 'yes', //Alterado | |
), | |
'downloadable' => array( | |
'id' => '_downloadable', | |
'wrapper_class' => 'show_if_simple', | |
'label' => __( 'Downloadable', 'woocommerce' ), | |
'description' => __( 'Downloadable products give access to a file upon purchase.', 'woocommerce' ), | |
'default' => 'no', | |
) | |
); | |
return($options); | |
} | |
add_filter('product_type_options', 'custom_admin_product_option', 10, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment