Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* Remove members only option from dropdown #3147

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions includes/compatibility/lifterlms.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,3 +655,29 @@ function pmpro_maybe_remove_lifterlms_lostpassword_url_filter() {
}
}
add_action( 'wp', 'pmpro_maybe_remove_lifterlms_lostpassword_url_filter' );

/**
* Remove Members-only from Access Plan -> Plan availability dropdown.
*
* @param LLMS_Access_Plan $plan The access plan object.
* @param int $id The post ID.
* @param LLMS_Order $order The order object.
* @since TBD
* return void
*/
function custom_llms_access_plan_mb_after_body( $plan, $id, $order ) {
// Bail if streamline is not enabled.
if ( ! get_option( 'pmpro_lifter_streamline' ) ) {
return;
}
?>

<script type="text/javascript">
jQuery( document ).ready(function($) {
$( 'option[value="members"]' ).remove();
});
</script>
<?php
}

add_action( 'llms_access_plan_mb_after_body', 'custom_llms_access_plan_mb_after_body', 10, 3 );