Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save michaelbeil/be5eb474d8d65afa71def7cf12f6fcf6 to your computer and use it in GitHub Desktop.
Save michaelbeil/be5eb474d8d65afa71def7cf12f6fcf6 to your computer and use it in GitHub Desktop.
Change default checkout button text for Paid Memberships Pro
<?php
/**
* Change default checkout button
* Simply change the text value to 'Submit' or whatever you like
*
* 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_change_default_button_text( ){
?>
<span id="pmpro_submit_span">
<input type="hidden" name="submit-checkout" value="1" />
<input type="submit" class="pmpro_btn pmpro_btn-submit-checkout" value="<?php { _e('Submit', 'paid-memberships-pro'); }?>" />
</span>
<?php
//show default checkout button
return false;
}
add_filter('pmpro_checkout_default_submit_button', 'my_pmpro_change_default_button_text', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment