WooCommerce: Email Notifications

You may be using the wrong hook. I use this : add_action( “woocommerce_email_after_order_table”, “custom_woocommerce_email_after_order_table”, 10, 1); function custom_woocommerce_email_after_order_table( $order ) { echo ‘<p>content after email table</p>’; } now, if you look at this link it will show you other hooks that you can use if you want to append other information to the email. for … Read more

wp_mail attachment not working

Attachments should always use the absolute filesystem path. Also to change the Content-Type of the email you should use the wp_mail_content_type filter. <?php function my_custom_email() { $to = ‘[email protected]’; $subject=”WordPress wp_mail”; $message=” <html> <body> <table rules=”all” style=”border-color: #666;” cellpadding=”10″> <tr>Hello WordPress</tr> </table> </body> </html> “; $attachments = array( WP_PLUGIN_DIR . ‘/my-plugin/uploads/sample_photo_01.jpg’ ); $headers[] = ‘From: … Read more

WordPress sending emails continuously. How to stop it?

The problem I think the problem here is that you’re generating an infinite loop, by placing wp_mail() inside the $phpmailer->action_function callback, that fires after each email. Each time you send an email with wp_mail(), you call wp_mail() again, and again, and again … etc Possible workaround You should instead use, for example, the following approach: … Read more

other shortcodes in Contact form 7 MAILS [closed]

WPCF7 incorporates more filters than used in the answer you already found. Analogously to that, the wpcf7_posted_data filter should do what you are looking for: function wpse73667_wpcf7_posted_data( $posted_data ) { $posted_data = do_shortcode( $posted_data ); return $posted_data; } add_filter( ‘wpcf7_posted_data’, ‘wpse73667_wpcf7_posted_data’ ); Note that this is an educated guess and untested. You can find all … Read more

Processing a subscription form with POST method?

This solution is based on a couple of WPMU Dev plugins: PopUp Pro and Mailchimp Integration. If you are WPMU Dev member then download and install them either from their Project pages or via the WPMU Dev dashboard in your WordPress admin interface. Most of the effort is in creating a custom style for the … Read more

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