Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ipokkel/08eb46c0be51cec1e8ab50ce10c0d8f6 to your computer and use it in GitHub Desktop.
Save ipokkel/08eb46c0be51cec1e8ab50ce10c0d8f6 to your computer and use it in GitHub Desktop.
<?php
/**
* Hide the submit button on the member profile edit page.
*
* 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_profile_edit_page_hide_submit_button() {
global $pmpro_pages;
// Are we on the member profile edit page?
if ( empty( $pmpro_pages ) || ! isset( $pmpro_pages['member_profile_edit'] ) || ! is_page( $pmpro_pages['member_profile_edit'] ) ) {
return;
}
?>
<style>
#member-profile-edit div.pmpro_submit {
display: none;
}
</style>
<?php
}
add_action( 'wp_head', 'my_pmpro_profile_edit_page_hide_submit_button' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment