Automattic / camptix

Moved to https://github.com/WordPress/wordcamp.org/
176 stars 94 forks source link

Adding Configurable Shipping option to PayPal Checkout #201

Closed EliW closed 6 years ago

EliW commented 6 years ago

Added an option to the settings screen under the PayPal plugin. Whether you want to obtain shipping information or not.

By default, the software didn't ask for shipping information, but some types of events may need this for sending out badges in advance, or other materials/shirts/etc. Was an easy addition.

coreymckrill commented 6 years ago

Hi @EliW, thanks for the PR! This probably isn't something we would consider adding into CampTix core, especially since it's not needed for all use cases. However, you might consider creating a separate plugin and making it a CampTix addon.

EliW commented 6 years ago

Thanks for the update @coreymckrill ... FWIW, the whole point of making it an option was the fact that it wouldn't be needed in all use cases. But would exist for anyone who did, in fact, need it.

Also, would have totally made it a plugin, except there didn't seem to be any way to modify this piece of information without changing the core plugin itself. Sure, I could duplicate the paypal plugin and then add this option into my version, and then disable the main version. But then it would be completely separate and not gain from the benefits of any work on core.

If you've got advice on how this could be a separate plugin that did nothing but modify the paypal plugin in the ways that this needed to, I'm all ears, but the appropriate spots in the code to handle this don't seem to exist without full modification.

Thanks

EliW commented 6 years ago

@coreymckrill : If you aren't interested in this (and given that I don't see a way to possibly inject this functionality in an addon) ... Would there be interest in a Pull Request that adds the appropriate hooks that would be needed TO do this as a plugin?

Thanks! BTW: It might be nice to have a KnownAddons.README that lists all known add-ons for Camptix. Would you be interested if I took the first pass at that? Could be super useful to folks who for example don't know that there is a Stripe plugin, or a Zapier Integration plugin, etc.

coreymckrill commented 6 years ago

@EliW Yes! We would definitely take a PR to add hooks like that. And I agree that hooks would be a good way to enable the functionality.

Re: KnownAddons, what about adding it as a new page on the wiki? You can submit pull requests for that as well (I think?)