Home / Archive / MemberPress: Remove the Pause link for specific membership
Duplicate Snippet

Embed Snippet on Your Site

MemberPress: Remove the Pause link for specific membership

By default, if pausing/resuming subscriptions is enabled for members, the Pause option will be available for each subscription a member has. This button will be available under the Subscriptions tab on the Account page.

This code snippet will remove the Pause options only for memberships specified within the code snippet.

The code needs to be adjusted by replacing the dummy membership ID of 123 with the real membership ID (or IDs) of the membership that should be affected by the code snippet.

Members will still be able to pause subscriptions for all other memberships.

Code Preview
php
<?php
function mepr_remove_pause_link( $output, $sub ) {
  if( '123' == $sub->product_id ) { return; }
  return $output;
}
add_filter( 'mepr_custom_pause_link', 'mepr_remove_pause_link', 10, 2 );

Comments

Add a Comment