-
Notifications
You must be signed in to change notification settings - Fork 805
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
Vdimitrakis/add price in posts endpoint #35066
Merged
Merged
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
74667ff
test commit
therocket-gr 0520c6b
Add price in /blaze/posts endpoint
therocket-gr 249b206
changelog entry
therocket-gr 72db987
strip_tags in price result
therocket-gr 2531b94
fixup-project-versions
therocket-gr 3b8b7dc
changelog
therocket-gr d10832a
Fixes in foreach loop
therocket-gr a34ba58
Added ENT_QUOTES in the html_entity_decode php function
therocket-gr 13546db
test commit
therocket-gr b375a5d
test commit
therocket-gr 8decee2
Remove the wc_price and format the price using WC functions
therocket-gr 33831c4
Merge branch 'trunk' into vdimitrakis/add-price-in-posts-endpoint
therocket-gr f0a8d0a
Fixed code in relation to gh comments
therocket-gr eca0d3c
Merge branch 'trunk' into vdimitrakis/add-price-in-posts-endpoint
therocket-gr 2cfa872
decode html special chars
therocket-gr e51f9de
Adding ENT_COMPAT
therocket-gr 47594ad
change to html_entity_decode
therocket-gr 4f9c4df
Added ENT_COMPAT again to be PHP 8.1 compatible
therocket-gr 1345c02
Merge branch 'trunk' into vdimitrakis/add-price-in-posts-endpoint
therocket-gr ff7f096
check if product is an instance of WC_Product in add_prices_in_posts
therocket-gr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
projects/packages/blaze/changelog/vdimitrakis-add-price-in-posts-endpoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: added | ||
|
||
Added price in blaze/posts endpoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
projects/plugins/jetpack/changelog/vdimitrakis-add-price-in-posts-endpoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: other | ||
|
||
Added price in blaze/posts endpoint |
Oops, something went wrong.
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.
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.
You may have to be more defensive here, just like in #35566, to avoid fatals in some scenarios.
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.
@jeherve check out this comment by Panos
#35066 (comment)
i think we should be ok
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.
I'm afraid that's not going to be enough. In some scenarios, Woo extensions may change what's returned there. That's something we ran into a few times in the past, and why we ended up checking for
$product instanceof WC_Product
in the PR I linked to earlier. Also see #11301 for another example.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.
Ok fixed, added the extra condition
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.
Being extra defensive doesn't hurt :)