You've already forked wc-licensed-product
Fix tab rendering bug in WooCommerce product edit page (v0.5.15)
- Simplified JavaScript to avoid conflicts with WooCommerce's native show/hide logic - Removed conflicting CSS rule for .hide_if_licensed - License Settings tab uses CSS class toggle for proper display - Variations tab properly shows for licensed-variable via woocommerce_product_data_tabs filter Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,22 +50,20 @@ code.file-hash {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* License Product Tab - Hidden by default, shown via JS based on product type */
|
||||
#woocommerce-product-data ul.wc-tabs li.show_if_licensed,
|
||||
#woocommerce-product-data ul.wc-tabs li.show_if_licensed-variable {
|
||||
/* License Settings Tab - Hidden by default, shown via JS based on product type */
|
||||
/* WooCommerce creates tab with class: {tab_key}_options (licensed_product_options) */
|
||||
#woocommerce-product-data ul.wc-tabs li.licensed_product_options {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* When shown, restore proper display for tab list items */
|
||||
#woocommerce-product-data ul.wc-tabs li.show_if_licensed.wclp-active,
|
||||
#woocommerce-product-data ul.wc-tabs li.show_if_licensed-variable.wclp-active {
|
||||
#woocommerce-product-data ul.wc-tabs li.licensed_product_options.wclp-active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Hide elements for non-licensed products */
|
||||
#woocommerce-product-data .hide_if_licensed {
|
||||
display: none !important;
|
||||
}
|
||||
/* Variations tab visibility for licensed-variable is handled by WooCommerce */
|
||||
/* We add show_if_licensed-variable class to the variations tab via PHP filter */
|
||||
|
||||
|
||||
/* Action Buttons */
|
||||
.wp-list-table .button-link-delete {
|
||||
|
||||
Reference in New Issue
Block a user