Trying to learn enabled to disabled.
-
Hi, I’m a bit scared to make changes and need help learning what to look for. This is my first attempt at changing codes in a plug-in without a tutor to work from.
I bought WooCommerce Custom Product Tabs from terrytsang. It works great but in “add product” page all the tabs I added are default enables and I want default disabled. Right now I have to uncheck all the tabs I don’t want and of course it would be quicker to only have to check the ones I want to us depending on products.
The box I need to change shows up in the advance add product section of the product data.
I have the php open and found several enable however I think it is one of more of these codes.
Do I need to change true to false
$enabled = get_post_meta($post_id, ‘enabled_tab_’.$post_id.’_’.$post_index, true);
if($enabled == 0 && $enabled != “”)
$this->woocommerce_wp_checkbox_input(array(‘tab’ => $post_index, ‘id’ => $post_index.’_tab_enabled’, ‘label’ => __(‘Enabled’, ‘custom_product_tabs’), ‘value’ => false, ‘class’ => ‘checkbox’));
else
$this->woocommerce_wp_checkbox_input(array(‘tab’ => $post_index, ‘id’ => $post_index.’_tab_enabled’, ‘label’ => __(‘Enabled’, ‘custom_product_tabs’), ‘value’ => true, ‘class’ => ‘checkbox’));$this->woocommerce_wp_textarea_input(array(‘tab’ => $post_index, ‘id’ => $post_index.’_tab’, ‘label’ => __(‘Content’, ‘custom_product_tabs’), ‘placeholder’ => __(‘Place your content here’, ‘custom_product_tabs’), ‘value’ => $tab[‘custom_tabs’], ‘style’ => ‘width:70%;height:21.5em;’));
echo ‘</div>’;Any advice and if so, can you explain the how or why to me.
- The topic ‘Trying to learn enabled to disabled.’ is closed to new replies.