• Resolved David

    (@fouriemc)


    Hi,

    Please could you supply me with the code to remove the ‘datePublished’ from the JSON code generated by the plugin in rich-json-ld.php? The filter hook is ‘wppr_schema’, defined in class-wppr-review-model.php, but I’ve been unable to find a way to remove the datePublished.
    Filter Creation in class-wppr-review-model.php:
    return apply_filters( 'wppr_schema', $ld, $this );
    Front-end Script Creation in rich-json-ld.php:
    echo json_encode( $review_object->get_json_ld() );

    I’d also like to remove the ‘offers’ section entirely, but that’s not as important.

    I’ve read Actions & Filters Available, How to Change the Name, Add Filter Code Reference and various other resources.

    I can filter it to show anything I want to replace it with, but not with the content that should be in there, and am unable to overcome the error:
    “Using $this when not in object context”

    Any help much appreciated.
    D

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Madalin

    (@madalin_themeisle)

    Hi @fouriemc

    I’m sorry for my delayed reply. Unfortunately, we can’t afford to help you with custom code modifications of this scope. It’s a little beyond what our support services include.

    You see, when it comes to technical issues of any kind, bugs; we’re here for you, and we will solve them ASAP.

    For custom coding work though, we recommend you to hire a developer.

    Thank you for understanding, and I hope we’re still cool!

    Thread Starter David

    (@fouriemc)

    No problem – resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filter Date Out of JSON Code’ is closed to new replies.