Send email to all registered users [closed]

Before you begin, you should know that sending mass emails is a delicate subject matter, and your hosting provider or mail provider has certain guidelines about this. Some hosting providers, such as Dreamhost, provide “Announcement Lists”, which act as a platform for writing newsletters (or essentially emailing a large group of subscribers). Sending unsolicited email … Read more

Send email when publish new post in certain categories

You can use transition_post_status function, then fetch users and send an email to all users. Here is a sample code, it’s not tested. But it will get you started with this. function wcs_send_mail_on_publish_category_posts( $new_status, $old_status, $post ) { global $post; if ( ‘publish’ !== $new_status or ‘publish’ === $old_status ) return; if ( in_category( array( … Read more

Adding “reply-to” in the email [closed]

Not sure what the WC_Email class does exactly, but if the $headers argument is an array of headers, then you’re almost there. To interpolate a variable value into a string in PHP you don’t have to do the <?php … stuff because it’ll be rendered as is. Instead, you can use: $headers = array( “Reply-To: … Read more

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