Skip to content

Protected content message duplicated if Yoast SEO and Elementor active #123

Description

@dwanjuki

Describe the bug
The protected content message appears twice on course pages when BOTH Yoast SEO and Elementor are active.
Replicated with both default Courses module and LearnDash module.

To Reproduce
Steps to reproduce the behavior:

  1. Create a course and restrict it to a membership.
  2. Activate Elementor and Yoast SEO plugins.
  3. Visit the restricted course page.
  4. See that protected content message appears twice.

Observe that the message appears once as expected if either Elementor or Yoast SEO is deactivated.

Screenshots
Image

Expected behavior
Protected content message appears once on course pages.

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
WP 7.0
PMPro 3.7.4
PMPro - Courses for Membership Add On 2.1.1
Elementor 4.1.1
Yoast SEO 27.7

A snippet workaround: https://gist.github.com/dwanjuki/d38a093214a0fb65dc094140867e61b1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions