Forked from andrewlimaza/default-checkout-level.php
Last active
June 3, 2025 15:47
-
-
Save dwanjuki/ffd6b171974bb3a013134c5ce9d0eb7f to your computer and use it in GitHub Desktop.
Default checkout level if no level parameter
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
<?php | |
/** | |
* Set default checkout level if none is specified. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_set_default_level( $level ) { | |
return 9; // Change the level ID | |
} | |
add_filter( 'pmpro_default_level', 'my_pmpro_set_default_level' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment