Send email once every 12 months to a particular user [closed]

Set update_user_meta() for a WP_User if get_user_meta() ends up empty. Update a key with a future date for the next year: $startDate=date(‘Y-m-d’); $futureDate=date(‘Y-m-d’, strtotime(‘+1 year’, strtotime($startDate)) ); Schedule an event in one year with wp_schedule_event() or use ‘daily’ to check all users for a relative year date. // WP_User_Query arguments $args = array ( ‘meta_query’ … Read more

Woo-Commerce Send mail by code. [closed]

After doing some research on google and woocommerce code i found the ans of the what i what. i have use following function for to send the mail to the user once order have been generated using the custom code in wordpress woo-commerce. WC()->mailer()->emails[‘WC_Email_Customer_Processing_Order’]->trigger($orderId);