How can I cleanup faulty PHPsnippets injected via the plugin

[ad_1]

https://projectdmc.org/support/topic/delete-faulty-code-snippets-from-the-plugin/

I ran into the problem same as the topic shown above.

In my case … I try to inject php snippets and it’s crash my whole site (code that try to change currency symbol in woocommerce) … unfortunately, safe mode doesn’t work this time … so I decided to deactivate all plugins in database table. Now it’s back to normal.

BUT Here’s the problem

If I still using WPcode again (just only activate plugin) … that faulty code will be active … and boom … crash again

My only option now is NO LONGER use this plugin or talk to developers …

So, How can I cleanup that faulty php code without activate WPcode plugin? Pls. Help

Thank you

Here is the code

add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);

function change_existing_currency_symbol( $currency_symbols) {

     $currency_symbols['ZMW'] = 'ABCD';
     
     return $currency_symbols;
}

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer