• Resolved bilgi25

    (@bilgi25)


    add_filter( 'edd_add_schema_microdata', '__return_false' );

    After the update this code became useless. Search console throws a lot of errors.

    “priceValidUntil”
    “aggregateRating”
    “review”
    “brand”
    “description”

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter bilgi25

    (@bilgi25)

    im found;

    remove_filter( 'wp_footer', array( EDD()->structured_data, 'output_structured_data' ) );

    thank you ??

    Thread Starter bilgi25

    (@bilgi25)

    The last piece of code caused a critical error. How can we solve this?

    Thread Starter bilgi25

    (@bilgi25)

    Call to undefined function EDD() …

    Plugin Support Mihai Joldis

    (@misulicus)

    Hi there.

    Can you provide the entire error message here? Use the CODE tags before adding the error message in the reply box.

    Thread Starter bilgi25

    (@bilgi25)

    Hi @misulicus ;

    Error Image

    The problem seems to be that the EDD function is undefined.

    Line 43 contains the updated code I added.

    • This reply was modified 2 years, 2 months ago by bilgi25.
    • This reply was modified 2 years, 2 months ago by bilgi25.
    Plugin Author Chris Klosowski

    (@cklosows)

    @bilgi25 That means you are placing it in a location that is loading too early to load. The theme’s functions.php has typically loaded before all the plugins are loaded.

    You would need to wrap that in a function to hook into something later in the page load like init, and it’s always good to put protection around it as well to ensure that the function exists.

    function bilgi25_remove_structured_data() {
    if ( ! function_exists( 'EDD' ) ) {
    return;
    }
    remove_filter( 'wp_footer', array( EDD()->structured_data, 'output_structured_data' ) );
    }
    add_action( 'init', 'bilgi25_remove_structured_data' );

    Thread Starter bilgi25

    (@bilgi25)

    Thank you so much ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Schema Microdata Code’ is closed to new replies.