Closed blizam closed 2 years ago
@blizam those look like outdated filter handles. Please see our docs for the current and correct ones. I tested add_filter('Yoast\WP\SEO\enable_notification_post_trash', '__return_false');
which also worked for my custom posttype.
TY!
Please give us a description of what happened.
We have this set (I believe this is the pertinent one):
add_filter('wpseo_enable_notification_post_trash', '__return_false');
We use a LMS plugin that has the custom post type of _gb_xapicontent. When these posts are moved to the trash we get the Yoast notifcations about creating a 301 redirect for the post
We have all the hooks set for disabling these, not just the above
/Automatic/ //Posts and Pages add_filter('wpseo_premium_post_redirect_slug_change', 'return_true' ); //Taxonomies add_filter('wpseo_premium_term_redirect_slug_change', 'return_true' ); /Notifications/ //Posts or Pages: Moved to Trash add_filter('wpseo_enable_notification_post_trash', 'return_false'); //Posts or Pages: Change URL add_filter('wpseo_enable_notification_post_slug_change', 'return_false'); //Taxonomies: Moved to Trash add_filter('wpseo_enable_notification_term_delete','__return_false'); //Taxonomies: Change URL add_filter('wpseo_enable_notification_term_slug_change','__return_false');
Please describe what you expected to happen and why.
We would like to suppress this behavior, we do not want any backend notifications from Yoast about creating 301s when posts, pages, taxonomies, etc are trashed.
How can we reproduce this behavior?
Technical info
Used versions