Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove Yoast's 'fill_cache' callback from Event Espresso's wpuser_login step ajax request.
<?php
// Remove Yoast fill_cache from EE's wpuser_login ajax request.
add_action( 'wp_loaded', 'ee_remove_yoast_fill_cache', 10);
function ee_remove_yoast_fill_cache(){
if( wp_doing_ajax() ) {
if(
class_exists('WPSEO_Options')
|| class_exists('EE_Registry')
|| EE_Registry::instance()->REQ->get('step', '') === 'wpuser_login'
) {
$Admin_Columns_Cache_Integration = YoastSEO()->classes->get( 'Yoast\WP\SEO\Integrations\Admin\Admin_Columns_Cache_Integration' );
remove_action( 'admin_init', [ $Admin_Columns_Cache_Integration, 'fill_cache' ], 10 );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.