pmpro-addon-packages
pmpro-addon-packages copied to clipboard
Cleaning up nested functions
The pmproap_pmpro_checkout_level() function currently contains a lot of nested functions that it hooks as needed: https://github.com/strangerstudios/pmpro-addon-packages/blob/7d022caffc222bdb3ea762295818d321c7fd499b/pmpro-addon-packages.php#L422-L541
This approach is not working with Stripe Checkout and is not how we recommend hooking into our checkout process in general. This PR pulls out those nested functions to standardize the code and make it easier to work with in the future.