Skip to content

Content Visibility settings not always working in widgets #3577

@andrewlimaza

Description

@andrewlimaza

Describe the bug
The content visibility setting that is applied to all blocks doesn't always work with blocks placed in a widget. We need to look into these blocks as some do work.

Somewhat related, the admin "View As" is not honored as well for blocks placed in the widget area.

Note: The content visibility block that can contain inner blocks works 100% and a great workaround instead of using the widget option of individual options.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Appearance' > 'Widgets'
  2. Ensure your site is using the Block Editor for widgets, the classic editor won't experience this.
  3. Add a 'Custom HTML' block to your widget area and enable the content visibility option to only show this to members.
  4. In a private tab, navigate to the frontend of your site to view the widget and the 'Custom HTML' block in the sidebar should display regardless of the content visibility block.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
  • This bug happens with a default WordPress theme active, or Memberlite.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

Details ``` Please share non-sensitive information about your hosting environment such as WordPress version, PHP version, Paid Memberships Pro and any related plugins versions. ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions