Change access to iworks_omnibus_integration_woocommerce::get_price()#39
Open
FerroMeow wants to merge 2 commits intoiworks:mainfrom
Open
Change access to iworks_omnibus_integration_woocommerce::get_price()#39FerroMeow wants to merge 2 commits intoiworks:mainfrom
iworks_omnibus_integration_woocommerce::get_price()#39FerroMeow wants to merge 2 commits intoiworks:mainfrom
Conversation
added 2 commits
April 7, 2025 11:20
Author
|
Changed access additionally to |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Change
iworks_omnibus_integration_woocommerce::get_price()from a private method to a public oneReasoning
There are many cases where we would only need the price, and the only way to get it right now is through parsing the result string of the
omnibus_price_messageshortcode. This however scales poorly with the amount of products shown - each product is passed to the shortcode by ID and then a WP_Product is created for each call. Allowing public use of this method would be beneficial for such use case.