Check if plugin is being disabled

Sure, there are activation and deactivation hooks. See: https://developer.wordpress.org/plugins/plugin-basics/activation-deactivation-hooks/ <?php register_deactivation_hook( __FILE__, ‘wpse_deactivate_myplugin’ ); function wpse_deactivate_myplugin() { // Delete the file and do any other cleanup needed here. }

How to display only one category posts on main page?

Example of a function to remove post category from the home page. function exclude_category_home( $query ) { if ( $query->is_home ) { $query->set( ‘cat’, ‘-5, -34’ ); } return $query; } add_filter( ‘pre_get_posts’, ‘exclude_category_home’ ); Replace the category ID with the one you want to exclude. Add to functions.php of your child theme.

Activate and deactivate two plugins automatically at certain hours

Rather than update the database you could write a mu-plugin to intercept reads from the active_plugins option, e.g. function option_active_plugins_akismet_or_yoast( $plugins ) { if ( !defined(‘WP_ADMIN’) ) { $hour = getdate()[ ‘hours’ ]; if ( $hour >= 10 && $hour < 19 ) { $to_remove=”wordpress-seo/wp-seo.php”; } else { $to_remove=”akismet/akismet.php”; } $remove_index = array_search( $to_remove, $plugins … Read more

How to add a text in the checkout page woocomerce?

You have two options. You can use the hook woocommerce_before_thankyou hook to add some html before “Obrigado. Seu pedido foi recebido” or you can replace the that thankyou text with any html you want with the hook woocommerce_thankyou_order_received_text If you want to use woocommerce_before_thankyou (NOTE: this hook will fire also on failed orders, but you … Read more

Identifying Plugins Based on Tables [closed]

This could be from a number of plugins, including WPForms, RankMath, and Woocommerce — it is the Action Scheduler, something that is included in them, originally made by Woocommerce. What I’d suggest is, if you are able, search your codebase, especially your plugin files, for an instance of actionscheduler — and see what comes up.