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
- 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
- Pass PHP variable to javascript
- wordpress get meta value by meta key
- What areas to Unit test while building a plugin?
- How Do I Make WordPress Run an Event Every Day?
- Long running action from plugin
- update_meta_user difference in i:1 and b:1, how to write b:1
- Registration Form Validation in wordpress
- Errors while using ajax from external wordpress page
- Dequeue / Deregister script and replace it with a new plugin
- Hide Theme options and Customize Admin menu
- Current user in plugin returns NULL
- How can I implement a notification system in wordpress?
- Building an email signup form. Where should the information be saved in the DB?
- Custom form action to handle data inside a plugin
- WP Post Template – Templates in own folder
- Map Custom Registration Fields to WordPress User Roles
- custom payment gateway in woocommerce failed to connect to remote api server
- Plugin options page with live preview?
- Ajax call returning 0
- How to update post’s content on post publish?
- WordPress plugin admin html being shown in Customizer iframe
- Ordering taxonomies by rank
- Plugin Options not being output
- Can I create a table on my DB without creating a plugin?
- Submit Form data to another page via Ajax (WordPress Way)
- WordPress checkbox and Illegal string offset
- add_submenu_page returns null
- get_option / wp_localize_script Not Working in OOP Plug In
- How to Show Author image and url in WordPress plugin directory? [closed]
- Extending a theme: build new features as plugin or core modules?
- Plugin generating unexpected output – on WP mysql dump import
- Remember the Meta Value With Radio Buttons
- jQuery code didn’t run on my plugin
- How to embed a new string in url?
- Custom Module, Extending WP with a Plugin?
- help intercepting save_post through plugin
- best way to run a php script away from the template?
- Add hook after content without formatting
- User loggedin as Subscriber form not sending
- wc_get_template_part doesnt display the content [duplicate]
- How to properly use wp_mail() in my own plugin?
- Prevent WordPress from sending set-cookie http header
- admin_post hook not firing function inside class
- How to store a secret for a plugin inside public_html
- Problem with checked box on wp car manager plugin
- How to add specific script to WordPress webpage that will working with user input and databases
- How to use functions found inside pluggable.php with my plugin files
- Create a link that calls our custom function in WordPress
- Update a previous version of plugin when the new plugin is built from the scratch
- Woocommerce list variations that are added already to cart in Single Product
- Plugin json page
- search into subcategories plugin subcategory value not come
- How Can the_post Be Hooked Like the_content and the_excerpt?
- How to tell which Plugin is displaying?
- Get Core Functionality from Within a (Secondary) Plugin File
- How to provide access to specific plugin to all the user roles except subscriber in wordpress
- Output pure JSON wordpress
- how to remove a rel=”nofollow” using call to action plugin
- Activate plugin button do nothing [closed]
- Suitable hook when creating, updating and deleting posts programmatically
- Scripts don’t enqueue after removing plugin
- How to override plugin function in code snippets WordPress
- How can I gather forums posted by visitors from different sites in one place? [duplicate]
- How to make content as required in custom post type?
- How to create a “Most Popular” & “Latest” TAB in WordPress
- is_user_logged_in() undefined at shutdown in plugin context
- What are Seeds? [closed]
- Shortcode cannot parse attributes within double quotes. ” is becoming ” breaking my shortcode