automatic send email at custom time

Creating a Scheduled Event First we’ll create a function that will schedule our event. Mine is called “mycronjob” and it will run once every day. All this code can go into your plugin’s main file, outside the main function: // create a scheduled event (if it does not exist already) function cronstarter_activation() { if( !wp_next_scheduled( … Read more

plugins_loaded action is not working properly

plugins_loaded is going to load this form much too early, even if you weren’t getting errors. The form is loading before the opening <html tags. You need to select better hooks for this– admin_notices maybe, but it is hard to tell exactly what you want. Second, you need to separate your handler: function process_wpse_194468() { … Read more

WordPress Ajax JSON success return no being recognized

You are not giving the action name to your AJAX call. In WordPress, you have to give an action name, the same name you give whatever is after wp_ajax_ and wp_ajax_nopriv_ In this case, the AJAX call should work if you change the data: inside your AJAX call, for this: data: {action: “contactform_action”, values: $(‘#contact-form’).serialize()} … Read more

Sending emails to separate accounts using a for loop

For whatever reason, this part: for ($z = 1; $z <= $Number_of_Categories; $z++) is the offender. even though $Number_of_Categories was defined above where it is used, the value wasn’t holding. I had to build a function instead, and do this: function get_Number_of_Categories(){ return “2”; } for ($z = 1; $z <= get_Number_of_Categories(); $z++) once I … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)