Skip to content
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

Filter product data fields instead of offer action #2786

Closed
Geczy opened this issue Mar 22, 2013 · 8 comments
Closed

Filter product data fields instead of offer action #2786

Geczy opened this issue Mar 22, 2013 · 8 comments
Labels
type: refactor The issue/PR is related to refactoring.

Comments

@Geczy
Copy link
Contributor

Geczy commented Mar 22, 2013

https://github.com/woothemes/woocommerce/blob/master/admin/post-types/writepanels/writepanel-product_data.php#L75

Could those li elements be looped through a filtered array?

In my case I have to remove some of those (currently using css). But this will also let developers hook in new li elements easier

@mikejolley
Copy link
Member

Converting the tabs from do_action( 'woocommerce_product_write_panel_tabs' ) to a filter will cause the problems we had on the frontend, but I agree its worth it.

Pushing to 2.1

@Geczy
Copy link
Contributor Author

Geczy commented Mar 22, 2013

Maybe implement the array, and leave the do_action in there but add a depr notice?

@mikejolley
Copy link
Member

The name of the action makes sense... and filters clash with actions of the same name. @coenjacobs

@Geczy
Copy link
Contributor Author

Geczy commented Mar 22, 2013

Actions don't interfere with filters, do they? I didn't think they did...

@mikejolley
Copy link
Member

They did last time I tried. Try it :)

@Geczy
Copy link
Contributor Author

Geczy commented Mar 22, 2013

You're right :(

In that case, just check if the hook is passing an array to the function or not. If it is, loop it, if it isn't, do nothing and display the raw HTML the plugins are hooking

@gglobalstep
Copy link

The said issue seems to be backend related. Can someone please provide more information/steps to verify?

@peterfabian
Copy link
Contributor

@gglobalstep There was a misunderstanding, the issue number related to another repository.
Others, please ignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor The issue/PR is related to refactoring.
Projects
None yet
Development

No branches or pull requests

4 participants