Hi @michaelm89
Probably RankMath checks if another plugin is active looking in the WordPress core option ‘active_plugins’. This is not the best way because another plugin (in this case Freesoul Deactivate Plugins) may filter the output of that option.
It would be better to check if a plugin is active by checking if one of its classes or functions exists. Better checking the function that they are going to use in their code.
In this case, it would be better they wrap their code in something that looks like:
if( function_exists( ‘is_cart’ ) ){
//their code
}
You should write to the support of Rank Math.
You should ask if they can modify their code in a way that if a third plugin filters the output of the option ‘active_plugins’ their function that depends on third plugins doesn’t trigger any fatal error.
Until they don’t check their code, you could add this code to solve the problem:
if( !function_exists( 'is_cart' ) && defined( 'EOS_WOOCOMMERCE_ACTIVE' ) ){
function is_cart(){
return false;
}
}
if the constant EOS_WOOCOMMERCE_ACTIVE is defined it means FDP has disabled WooCommerce on that page, and if is_cart doesn’t exist, your code will give that function returning false (if WooCommerce is not active it’s surely not a cart page).
Put the code above in a functional plugin that is active on the page where you have problems, or in the functions.php of your child theme if any.
Let me know if it helps. But please open a ticket also with RankMath, or if you prefer it, I can open it myself, because also other users may have the same problem.
I will be grateful if you can open it. you will certainly describe the problem better than I do.
thank you for your quick answer π
You are welcome @michaelm89
Do you confirm it works now? If so I will close this thread.
hello,
still waiting for rankmath update π
Hi @michaelm89
RankMath v 1.0.59 should solve the issue. Let me know if it works now.
hello,
now everything works great, thank you for your support!
Hi @michaelm89
You are welcome! Thank you very much for the confirmation!