You've already forked wc-composable-product
Fix admin CSS - tabs disappeared due to overly aggressive selectors
CRITICAL FIX: The previous CSS change used .show_if_composable with !important which hid ALL elements with that class, including the tab links themselves. Changes: - Changed from .show_if_composable to .options_group.show_if_composable - Changed from .product_data_tabs .composable_options to li.composable_options - Removed !important flags (not needed with specific selectors) - Now only hides the general tab option groups, not the tab links This fixes: - Missing Composable Options tab in product edit screen - Fields appearing out of context - Tab navigation completely broken The issue was that WooCommerce adds 'show_if_composable' class to BOTH: 1. The tab link (li.composable_options.show_if_composable) 2. The general tab fields (div.options_group.show_if_composable) Now we specifically target only the option groups, leaving tabs alone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,29 +19,23 @@
|
|||||||
min-height: 150px;
|
min-height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide composable-specific elements by default */
|
/* Hide composable-specific elements by default (but not tabs) */
|
||||||
.show_if_composable {
|
.options_group.show_if_composable {
|
||||||
display: none !important;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show composable elements when composable product type is selected */
|
/* Show composable elements when composable product type is selected */
|
||||||
body.product-type-composable .show_if_composable,
|
body.product-type-composable .options_group.show_if_composable {
|
||||||
.product-type-composable .show_if_composable {
|
|
||||||
display: block !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ensure General tab fields don't show in Composable Options panel initially */
|
|
||||||
#composable_product_data .options_group {
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide the Composable Options tab link by default */
|
/* Hide the Composable Options tab link by default */
|
||||||
.product_data_tabs .composable_options {
|
.product_data_tabs li.composable_options {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show the Composable Options tab when composable type selected */
|
/* Show the Composable Options tab when composable type selected */
|
||||||
body.product-type-composable .product_data_tabs .composable_options {
|
body.product-type-composable .product_data_tabs li.composable_options {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user