Rewrite product attribute helper using new filter#222
Open
Ninos wants to merge 1 commit intovendidero:masterfrom
Open
Rewrite product attribute helper using new filter#222Ninos wants to merge 1 commit intovendidero:masterfrom
Ninos wants to merge 1 commit intovendidero:masterfrom
Conversation
Collaborator
|
Hi @Ninos, thanks for your work on making this easier to achieve :) We will definitely need a backwards compatibility here for WooCommerce < 10.6 so we might need to add some checks whether the current version already has those changes implemented or not and leave the original implementation in tact for some time. Best, |
e71c21e to
adff655
Compare
Author
|
@dennisnissle yeah good point! Added some fallback to the static Tested this PR in combination with my patched woocommerce version, seems working fine. Haven't tested following:
|
adff655 to
4b1c719
Compare
4b1c719 to
140d7bc
Compare
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.
After following woocommerce PR (woocommerce/woocommerce#62572) it's "now" (in WC >=
10.6) easier to update product attributes.So thx for your crazy workaround here, but following quote in your code is (happily) no longer valid :D
TODO
The helper class includes following function
get_attribute(), which is usingWC_GZD_Product_Attribute, I'm not sure if it's possible to remove this part without breaking anything. In my opinion the wholeWC_GZD_Product_Attributeclass should be removed (also used somewhere in importer script).PS: WC
10.6is still not released & this would also break compatibility with instances updating germanized but not woocommerce. So we may should wait a while before merging... :'D