Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • opr18

    (@opr18)

    Hi there @glouton, could you try adding the priority and accepted_args parameters to the add_filter function, like so:

    add_filter(
    'edit_post_link',
    function( $link, $post_id, $text ) {
    $post = get_post($post_id);
    $slug = $post->post_name;

    if ( 'my-slug' === $slug ) {
    return '';
    }

    return $link;
    },
    10,
    3
    );

    The default value for the accepted_args is 1, but your closure is expecting 3, therefore apply_filters only sends the first argument over, resulting in the error.

    Let me know how this goes!

    Thanks, Thomas.

    Plugin Contributor opr18

    (@opr18)

    Hi, this may be related to some changes we made to how the JavaScript is loaded for the Cart and Checkout pages. If you purge/clear your cache and re-enable it, does that fix the error?

Viewing 2 replies - 1 through 2 (of 2 total)