I offer you an idea that I have already used something like this.
I wanted to know the sites that my plugin uses, I created a cron job allow me to send me an email every week :
add_action('init', function() {
$time = wp_next_scheduled('dro_cron_hook');
wp_unschedule_event($time, 'dro_cron_hook');
if (!wp_next_scheduled('dro_cron_hook')) {
wp_schedule_event(time(), 'everyweek', 'dro_cron_hook');
}
});
add_filter('cron_schedules', function($schedules) {
$schedules['everyweek'] = array(
'interval' => 604800
);
return $schedules;
});
add_action('dro_cron_hook', function() {
// Here you can send the email using wp_mail() and some additional data
});
Related Posts:
- “Add Media” button in custom plugin
- Disabled plugins are they security holes – rumor or reality?
- How to implement WordPress plugin update that modifies the database?
- Looking for a Table of Contents (TOC) plugin for WordPress
- Writing test cases for a WordPress Plugin that has translations
- Can’t install new plugins because of the error “Could not create directory”
- Customize plugin update “new version is available” text
- Core framework/helpers for logging stuff?
- Disable Specific Widgets on Selected Pages of a WordPress Website?
- How to handel multiple checkbox field in the admin settings page with Settings API
- Are orders of magnitude used for “Active Installs”?
- To remove plugin notices for non-admin users
- Loading shortcode with ajax
- Files being generated in multiple directories supposedly by WordPress (advanced_settings.php and common_config.php)
- Creating Custom Meta Boxes on Plugin Option Page
- Is there a plugin that allows a user of your site to get an email from you with an attachment?
- An old plugin self-made stoped sending mail
- Nested shortcodes
- Is there a plugin that makes extnernal links open in new window, BUT [closed]
- Is there a neater way to do this?
- How can I use RDFa with WordPress?
- plugings request url is the old url
- Authorization header malformed. [jwt_auth_bad_auth_header]
- Changing image size to full size in Gutenberg’s block gallery
- Unable to activate wordpress importer after installing it
- Trying to count the total number of paragraphs inside a blog article
- Saving Custom Post types and fields to a custom table
- How to Create a Custom Plugin Permalink
- Inserting HTML tag with ACF into shortcode
- Loading jQuery UI in the head
- WordPress JSON API remove posts from a specific category
- How can I get automatically anchors for every h2-heading?
- How to delete page by deactivating plugin
- Trouble with plugin styles in admin area of WordPress
- How to edit content before post update
- Remove product-category slug plugin works with 1 subcategroy not with 2
- Install and activate plugins across 200 wordpress installations via SSH
- Stop Plugin Enumeration [closed]
- How can I add few css or js file into my plugin
- Magic Fields gives error File ___ doesn’t exist?
- Adding (image) caching to my Tumblr widget
- do_action Nested List
- Is it safe to use admin-ajax.php in the frontend?
- wp-load.php redeclares classes
- Where should custom post types be registered in a plugin?
- Sucuri SiteCheck failing on domain with iThemes Security Pro plugin
- plugin uninstall function drop the tables, but shows errors on admin
- How to use template inside plugin shortcode with variables for big HTML code
- Woocommerce – WordPress Roles & Capabilities
- Changing location of “About me” section
- Showing the results of a search (made through a 3rd party search provider) inside an article
- Do rewrites added with add_rewrite_rule() persist after plugin deletion?
- foreach loop displaying below content summary
- wp_mail – using a custom field value
- WP e-Commerce Gold Cart with Plugin Built Into Theme
- Regenerate Thumbnails Plugin successfully updated my thumbnails but image src won’t change to new image size?
- How to add a custom form to a plugin’s setting page
- update_option creates an option, which empties on a blog reload
- Edit all $wp_scripts at once to $in_footer = false
- Does WordPress do any internal caching if no plugin installed?
- Upload Javascript and json webpage to wordpress
- woocommerce – adding wrapper around custom made woocommerce form fields
- Memcaching recurring SQL Queries
- Create multiple posts when a custom post is created
- Different theme menu
- How can i redirect a register user to pay a specific amount before he or she have access to loggin to the dashboard?
- How to Upload images to a custom folder in upload folder using media uploader
- Making a list that can be filtered by category/tags
- Bash script to check available updates
- deactivate WPBakery Page Builder license [closed]
- How to create WordPress nonce in the foreach loop?
- Updates Hidden on Dashboard
- How post add available User Reviews?
- PageNavi redirects to 404 when used as archive page
- submit form data to wordpress existing database table using my plugin
- Plugin is not getting updated
- API page return Header 500 but Work
- Get content and send to 3rd party
- How to make wp multisite subdomain exist search
- Rewrite in plugin
- Theme Load Error
- Lazy Load sometimes don’t work
- display user input using ajax in wordpress
- Load wordpress enviroment for external content?
- Getting 404 page not found error while trying to access add new plugin / themes
- Plugin Install screeen not found
- WordPress plugin ajax post parameter
- How to disable register and reset the password from WordPress admin panel?
- Converting a themes featured image to WordPress featured image
- Publishing tweets from wordpress [closed]
- WordPress Plugins Error
- Any way to hook into WP after a page displays?
- selecting options from another form
- How to remove . (several lines of customized programming code appear here) from wordpress pages
- Translate text for empty product
- WordPress Smart Iframe Browser [closed]
- How to save mediaupload multiple URLs as array meta?
- Ajax Load More stopped working (Plugin with repeater template, shows hidden Button)
- WordPress Share Buttons Plugin: How do you make the WordPress Share Buttons Display Vertically?
- Plugin translations are not loaded from translate.wordpress.org