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
Hide sale badge if product image is disabled #43334
Conversation
Hi @Aljullu, @imanish003, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good, but I wonder if we could hide it from the PHP side, instead of from CSS. I just took a look and I think we would only need to modify this line? 🤔
if ( empty( $this->attributes['contentVisibility']['price'] ) ) { |
What do you think?
@Aljullu good idea, done! |
Test Results SummaryCommit SHA: 8b1a5f4
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for handling that, @roykho!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh nice catch! Thank you for working on this, Roy! ✅
Submission Review Guidelines:
Changes proposed in this Pull Request:
This PR fixes an issue with the on-sale badge covering the product title when product image is disabled.
For reference the woocommerce/woocommerce-blocks#10297 that introduced this issue.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Hand-picked Products
,Best Selling Products
,Products by Category
,Newest Products
,On Sale Products
,Products by Attribute
,Products by Tag
,Top Rated Products
.Sale
badge is on the top right of the product image.Sale
badge is now hidden.Changelog entry
Significance
Type
Message Fix on-sale badge covering product title when product image is disabled
Comment