Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Submission Review Guidelines:
Changes proposed in this Pull Request:
Added numeric check for Regular price variable in bulk edits. A strict numeric check is not required. It passes the result.
Closes #37681.
How to test the changes in this Pull Request:
Thank you @lynnjat7 for listing the steps to reproduce the bug in detail. It helped to re-create the bug & fix it.
Using the WooCommerce Testing Instructions Guide, following points can be followed to test the fixes.
Create a few simple products on the back end.
Set a few products with blank Regular prices.
When viewing the main Products list under Products, check off products to edit, including the one with the blank price.
Click on Bulk Actions > Edit
Select to edit the Sale price as "regular price decreased by" and enter some value with % as the discount.
Blank price product will remain as is. The rest of the products will get updated and Admin will view the success screen.