Add this to the functions.php file of your active (child) theme-
add_action( 'init', 'wpse_393267_activate_plugin' );
function wpse_393267_activate_plugin() {
if( !function_exists( 'is_plugin_active' ) ) {
include_once ABSPATH . '/wp-admin/includes/plugin.php';
}
$plugin_to_activate="jetpack/jetpack.php"; // plugin-dir/plugin-file.php
$date_to_activate="2021-08-13"; // YYYY-MM-DD
if( is_plugin_active( $plugin_to_activate ) ) return;
if( time() >= strtotime( $date_to_activate ) ) {
activate_plugin( $plugin_to_activate );
}
}
Change the $plugin_to_activate and $date_to_activate as you want.
Related Posts:
- How ( and mostly at what time ) can i prevent the alternate cron from running?
- How does task scheduler plugin implements cron that is not dependent on page load request? [closed]
- Switch from wp-cron to a server cron job
- WordPress cron job running more than once
- Cron: Update four post at Hour
- Better way to run heavy scripts using WordPress database
- WordPress Cron function is not working
- Adding custom cron_schedule prior to wp_schedule_event
- Cron Job not working
- Conditionally enqueue a widget’s script/stylesheet in HEAD (only when present on page!)
- Uncaught Error: Call to undefined function wp_generate_attachment_metadata() @ wp-cron
- Schedule WordPress Auto-Updates to only run during business hours
- How do I email a new page password to somebody every month?
- What happens when wp_cron is deactivated in WordPress?
- wp_schedule_single_event function not working
- Unable to load stylesheets and scripts to plugin settings page
- action-scheduler vs wp-background-processing
- Why is wp-cron only executing on page visit?
- How to periodically scrape and cache strings from remote txt files. – My First Plugin
- Does using WP-cron make the site slower for the user?
- wp_schedule_single_event not working: cron job is triggered but nothing gets executed
- How to make a implement queue for scheduling tasks in WordPress?
- Setup wp_schedule_event within a custom plugin
- How to set intervals in cron jobs?
- How to use custom Javascript code inside a plugin?
- What causes wp_schedule_single_event to fire off?
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- Cron task gets removed from the schedule
- WP_CRON issue with UTC and local time
- WordPress crob job performance
- How to customize ‘recurrance’ of’ wp_schedule_event’?
- How to set-up multiple cron task with wp_schedule_event so that they do not overlap?
- Running a function using Crown WordPress on one day a week, for example, Mondays of every week
- WordPress “wp cron event run” as Siteground cron job
- Which approach for managing automatic updates would be more robust?
- Does the number of downloads displayed for a plug-in in the WordPress.org plug-in directory include automatic updates?
- Why do I get this “plugin does not have a valid header” error?
- Which method is best to enqueue scripts
- WordPress Capabilities: edit_user vs edit_users
- Function to activate WordPress theme inside a plugin
- What is the correct way to check if WP_Filesystem can write to a directory without aking for username / password?
- Is there a WordPress Plugin that allows voting “does this coupon work” on specific links like Retailmenot
- Custom interval is not working
- shortcode doesn’t work
- Built in admin ajax hooks?
- Force plugin to fail activation
- Could someone please help me to add category id with in this query so this will return posts from a certain category?
- What are the benefit in adding hook in the init() hook?
- building plugin and it is displaying above plugins page
- load_theme_textdomain path
- Dynamic CSS Vs Inline Issues in Code any Way around in a WordPress Themes?
- Is license need for free wordpress plugin
- plugin development: problem with functions
- Getting a List of Categories for Use in a Plugin?
- Building plugin with changeable custom post type values…advice needed
- How to get all of the activate_plugin action parameters?
- Display update notification messages like ‘What’s New’
- What can be reason for no plugin-strings available under stable section on translate.wordpress.org?
- Why Is This Code Causing The Admin Bar to Disappear?
- WP_Terms_List_Table Quick Edit not working
- Is there a directory my plugin can write files to that cannot be viewed via the browser/url?
- How to exclude certain files from the plugin editor?
- How do I combine a theme with a plugin
- Use wp-config.php constants in all files of plugin
- Prevent direct access to WordPress plugin assets?
- Using ACF default value to autoincrement a number field
- a href adds default URL with the given echo URL
- plugins_url() works everywhere but wp_reqister_script()
- Integrating boxtal PHP library into a custom WordPress Plugin
- Images under 1MB are not being compressed
- Sanitize $_GET variable when comparing
- Where can I save plugin data?
- show my own admin_notices after a post has been published
- How to add a WordPress Nonce for this form to avoid CSRF
- Overriding current theme files via plugin
- How to create a plugin that includes all the other plugins?
- How to add update function to plugin without adding it to https://wordpress.org/plugins/ [closed]
- How to edit link for comment count
- Integrating Custom Database with WordPress
- Need to know if my approach to designing a geneaology plug-in for wordpress makes sense
- Make downloadable ebook read online without download option
- WordPress rewrite rule depend on meta values not ids
- Problem with wordpress has_action() function
- Offering a freemium plugin (a free version + paid version)
- In woocommerce, is there any way to empty wordpress default mini cart when order placed?
- Making a Custom Post Type Plugin – keep getting the white screen of death
- Limit Google Ads to particular blog posts
- Communicating to plugins from webserver
- Buddypress Member list not showing admin and mods
- Hook into install email
- Shortcode in a blog post, footer and related products stop working
- Autoloading a PHP class – working outside, but not inside WordPress plugin
- Linking Plugin Files to WP
- Is there a way to include some external script to some or all pages in a wordpress site?
- Function not being called on form submit, only blank admin-post.php page
- How to give specific class name to category in wordpress with code snippets
- WordPress.Security.NonceVerification.Recommended
- BBPress Customization with Custom Plugin
- How do I apply different block supports to different parts of my custom block?
- Custom Gutenberg blocks not showing in WP editor