Enable checkbox of advanced tab for new products by default
-
I changed the php code of html-product-data-advanced.php file in wp-content\plugins\woocommerce\includes\admin\meta-boxes\views from
<?php if ( post_type_supports( 'product', 'comments' ) ) : ?> <div class="options_group reviews"> <?php woocommerce_wp_checkbox( array( 'id' => 'comment_status', 'value' => $product_object->get_reviews_allowed( 'edit' ) ? 'open' : 'closed', 'label' => __( 'Enable reviews', 'woocommerce' ), 'cbvalue' => 'open', ) ); do_action( 'woocommerce_product_options_reviews' ); ?> </div> <?php endif; ?>
to
<?php if ( post_type_supports( 'product', 'comments' ) ) : ?> <div class="options_group reviews"> <?php woocommerce_wp_checkbox( array( 'id' => 'comment_status', 'value' => 'true', 'label' => __( 'Enable reviews', 'woocommerce' ), 'cbvalue' => 'true', ) ); do_action( 'woocommerce_product_options_reviews' ); ?> </div> <?php endif; ?>
The checkbox of “Enable review” when I create a new product is enable, but it doesn’t work. How can I mark it by default for every new product?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Enable checkbox of advanced tab for new products by default’ is closed to new replies.