Remove field in the form : only works for “url”, not for “email”?

This works fine for me: <?php add_filter(‘comment_form_default_fields’, ‘wpse53687_filter_fields’); /** * Unsets the email field from the comment form. */ function wpse53687_filter_fields($fields) { if(isset($fields[’email’])) unset($fields[’email’]); return $fields; } One reason that it could be failing on your theme is that args were passed into comment_form. Specifically, the theme author passed in a fields key into the … Read more

I want to Add My Product Image to Admin Order Email in Woocommerece [closed]

The default admin email can be found in woocommerce/templates/emails/admin-new-order.php the order items table is called in line 28, with a function called email_order_items_table. This function also takes an argument for including the thumbnail (see the class-wc-order.php, line 1052). if you copy the email templates to your theme folder, you can edit the admin-new-order.php file and … Read more

Auto create file and send it via wp_mail()

Can’t help you with the creation of the .doc-file, as i have never done that. But if you manage to get the encoded file into a string, you can work with the WordPress PHP-Mailer instance like this: function send_my_mail_with_attachment($from,$to,$subject,$body,$attachmentstring=””){ global $phpmailer; // (Re)create it, if it’s gone missing if ( ! ( $phpmailer instanceof PHPMailer … Read more

Do action for only switch status for publish_post

You can use the transition_post_status hook, which is fired whenever the status is changed. So to perform an action when the status is changed to publish, you’d do this: function notificationApprove( $new_status, $old_status, $post ) { if ( ‘publish’ === $new_status && ‘publish’ !== $old_status && ‘post’ === $post->post_type ) { // Send mail } … Read more

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