Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show message in Inventory tab for variable products #37185

Merged
merged 7 commits into from Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,4 @@
Significance: minor
Type: dev

Show a message for variable products
7 changes: 7 additions & 0 deletions plugins/woocommerce/client/legacy/css/admin.scss
Expand Up @@ -959,11 +959,18 @@
}

#variable_product_options #message,
#inventory_product_data .notice,
#variable_product_options .notice {
display: flex;
margin: 10px;
background-color: #ffffff;
> p {
a {
text-decoration: none;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally there shouldn't be a line break in the middle of this link. We should set white-space: nowrap on it.

Before (again, text made longer to simulate translation, etc.):

Screenshot 2023-03-13 at 09 28 50

After:

Screenshot 2023-03-13 at 09 29 01

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

white-space: nowrap;
}
}
> p:not( :last-child ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned, this explicit width causes issues but it outside the scope of this PR, so I'm good with this fix for now!

width: 85%;
}
.woocommerce-add-variation-price-container {
Expand Down
Expand Up @@ -10,7 +10,11 @@
}
?>
<div id="inventory_product_data" class="panel woocommerce_options_panel hidden">

<div class="inline notice woocommerce-message show_if_variable">
<p>
<?php echo esc_html_e( 'Settings below apply to all variations without manual stock management enabled.', 'woocommerce' ); ?> <a target="_blank" href="https://woocommerce.com/document/variable-product/"><?php esc_html_e( 'Learn more', 'woocommerce' ); ?></a>
</p>
</div>
<div class="options_group">
<?php
if ( wc_product_sku_enabled() ) {
Expand Down