Support » Plugin: WP-Members Membership Plugin » [Plugin: WP-Members] "unblock" is true even when set to "false" or "0"

  • Resolved CodeMonkey613


    I made an Advanced Custom Field entry for the ‘unblock’ field to easily switch between true/false. However, it doesn’t matter what the setting is on the field (can be true, false, 0, 1) it always unblocks the post/page. I have to delete the custom variable altogether to make it block again.

    wp-members-core.php at line 338 doesn’t make any sense. You would have to change it to something like this:

    $unblock_var = get_post_custom_values(‘unblock’);

    if( WPMEM_BLOCK_POSTS == 1 && (!isset(unblock_var) || (isset($unblock_var) && ($unblock_var == “false” || $unblock_var == “0”))) ){ $block = true; }

Viewing 1 replies (of 1 total)
  • Plugin Author Chad Butler


    There is a legacy reason for the way it is the way it is. It will probably accept a false value in the future, but for now, to do what you are trying to do, you should be able to set the value to ”.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP-Members] "unblock" is true even when set to "false" or "0"’ is closed to new replies.