Last active
June 17, 2022 12:12
-
-
Save DumahX/4aeb7e6d8bc92dd4b496da3c8caf9d3a to your computer and use it in GitHub Desktop.
This file contains 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 | |
function maybe_hide_pause_resume_links($link, $sub) { | |
// Replace 123, 456 with the membership IDs which members can still pause/resume subscriptions for. | |
$products_to_allow = array('123', '456'); | |
$product = $sub->product(); | |
if(in_array($product->ID, $products_to_allow)) { | |
return $link; | |
} else { | |
$link = ''; | |
return $link; | |
} | |
} | |
add_filter('mepr_custom_pause_link', 'maybe_hide_pause_resume_link', 10, 2); | |
add_filter('mepr_custom_resume_link', 'maybe_hide_pause_resume_link', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment