Forum Replies Created

Viewing 15 replies - 16 through 30 (of 79 total)
  • ZLC

    (@kindnessville)

    The entire ‘mailer’ function in the plugin code needs to be replaced by the following:

    function mailer($id, $parent_id, $comment_post_id) {
        global $wpdb, $user_ID, $userdata;
    
        $post = get_post($comment_post_id);
    
        if (empty($post)) {
            unset($post);
            return false;
        }
    
        if ($this->options['mail_notify'] == 'admin') {
            $cap = $wpdb->prefix . 'capabilities';
            if ((strtolower((string) array_shift(array_keys((array)($userdata->$cap)))) !== 'administrator') && ((int)$post->post_author !== (int)$user_ID)) {
                unset($post, $cap);
                return false;
            }
        }
    
        $pc = get_comment($parent_id);
        if (empty($pc)) {
            unset($pc);
            return false;
        }
    
        if (intval($pc->comment_mail_notify) === 0 && ($this->options['mail_notify'] === 'parent_uncheck' || $this->options['mail_notify'] === 'parent_check')) {
            unset($pc);
            return false;
        }
    
        $parent_email = trim($pc->comment_author_email);
    
        if (empty($parent_email) || !is_email($parent_email)) {
            unset($pc, $parent_email);
            return false;
        }
    
        $cc = get_comment($id);
        if (empty($cc)) {
            unset($pc, $cc);
            return false;
        }
    
        if ($cc->comment_approved != '1') {
            unset($pc, $cc);
            return false;
        }
    
        if ($parent_email === trim($cc->comment_author_email)) { //Do not send email if you reply to your own comments
            unset($pc, $cc);
            return false;
        }
    
        $mail_subject = sanitize_text_field($this->options['mail_subject']);
        $mail_subject = str_replace('[blogname]', get_option('blogname'), $mail_subject);
        $mail_subject = str_replace('[postname]', $post->post_title, $mail_subject);
    
        $mail_message = wpautop($this->options['mail_message']);
        $mail_message = str_replace('[pc_date]', mysql2date(get_option('date_format'), $pc->comment_date), $mail_message);
        $mail_message = str_replace('[pc_content]', $pc->comment_content, $mail_message);
        $mail_message = str_replace('[pc_author]', $pc->comment_author, $mail_message);
    
        $mail_message = str_replace('[cc_author]', $cc->comment_author, $mail_message);
        $mail_message = str_replace('[cc_date]', mysql2date(get_option('date_format'), $cc->comment_date), $mail_message);
        $mail_message = str_replace('[cc_url]', esc_url($cc->comment_url), $mail_message);
        $mail_message = str_replace('[cc_content]', $cc->comment_content, $mail_message);
    
        $mail_message = str_replace('[blogname]', get_option('blogname'), $mail_message);
        $mail_message = str_replace('[blogurl]', esc_url(get_option('home')), $mail_message);
        $mail_message = str_replace('[postname]', $post->post_title, $mail_message);
    
        $permalink = get_comment_link($parent_id);
        $mail_message = str_replace('[commentlink]', esc_url($permalink), $mail_message);
    
        $wp_email = 'no-reply@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
        $from = "From: \"" . get_option('blogname') . "\" <$wp_email>";
    
        $mail_headers = "$from\nContent-Type: text/html; charset=" . get_option('blog_charset') . "\n";
    
        unset($wp_email, $from, $post, $pc, $cc, $cap, $permalink);
    
        $mail_message = convert_smilies($mail_message);
    
        $mail_message = apply_filters('comment_notification_text', $mail_message, $id);
        $mail_subject = apply_filters('comment_notification_subject', $mail_subject, $id);
        $mail_headers = apply_filters('comment_notification_headers', $mail_headers, $id);
    
        wp_mail($parent_email, $mail_subject, $mail_message, $mail_headers);
        unset($mail_subject, $parent_email, $mail_message, $mail_headers);
    
        return true;
    }
    ZLC

    (@kindnessville)

    If you enjoyed the original colors, go to Slimstat > Settings > Reports and add this to the Custom CSS:

    .header.is-known-user {background-color: #f2ce93 !important;}
    .header.is-direct {background-color: #d0e0eb !important;}
    .header.is-search-engine {background-color: #c3e55e !important;}

    Please let me know if this is accurate or if you recall the colors for the other classes: .is-spam and .is-known-visitor.

    ZLC

    (@kindnessville)

    The moderator deleted my post with the screenshot.

    Logged-in users were orange, random visitors were blue, and non-user visitors who had interacted with my website before (by leaving a comment, etc.) were lime green.

    I hope this helps.

    Thread Starter ZLC

    (@kindnessville)

    Fabulous, Mia! I appreciate your speedy help!

    Thread Starter ZLC

    (@kindnessville)

    Thank you, Mia. This plugin sounds great!

    How would I activate this feature?: “And there is an option let you get the data even though your customers have not submitted the form yet.”

    Thread Starter ZLC

    (@kindnessville)

    Thank you so much, Diana. I updated the plugin to the pro 2.35 version, which now works.

    One small tweak for the next version: When I am redirected back to the login panel after clicking “Please log in,” the error message remains at the bottom of the login page (it doesn’t in the standard 2.25.1 version).

    Otherwise, it is 100% functional. I appreciate all your support with this.

    Have a lovely weekend!

    • This reply was modified 1 year, 1 month ago by ZLC.
    Thread Starter ZLC

    (@kindnessville)

    I’m sorry, Diana. The only solution that worked for me was installing the non-Pro version of your plugin, 2.25.1.

    But here’s what I did:

    With the Pro plugin activated, I installed the code you shared above. But it didn’t change the “Please log in” link’s behavior.

    I thought it may have had something to do with my license expiring, so I renewed it and activated it. However, installing the latest version of your Pro plugin, 2.34, did not fix the issue.

    I cleared my cache everywhere just to be sure it wasn’t some issue like that.

    But nothing worked.

    So I deactivated the Pro version, activated the non-Pro version, and I am now using that version of your plugin just fine.

    It would be great to have the Pro version work too.

    I’m wondering if you have any suggestions for me to troubleshoot.

    I really appreciate your help with this.

    Thread Starter ZLC

    (@kindnessville)

    Thank you so much, Diana! This worked. I appreciate your help.

    Thread Starter ZLC

    (@kindnessville)

    Thank you so much, Diana. Unfortunately, I installed the zipped update, but it will not activate on my plugins page. It’s probably because I have the Multi-Step Checkout Pro for WooCommerce Version 2.29.1 activated on my site.

    I tried to deactivate the Pro plugin, which allowed me to activate the 2.25.1 version you offered, but when I reactivated the Pro plugin, it deactivated the 2.25.1 version.

    I think I’m stuck. Much like that “Please log in” button ??

    Thread Starter ZLC

    (@kindnessville)

    I added the snippet. Almost perfect, Diane. Thank you so much!

    The breadcrumb with “billing” up top and its “next” button under the “place order” button still display when logged in.

    Is there a way to remove them?

    Thread Starter ZLC

    (@kindnessville)

    Or if the product is free, to simply combine the billing with the payment and eliminate the steps.

    Thank you!

    ZLC

    (@kindnessville)

    I immediately disabled and deleted the amr plugin.

    Then I found and installed this plugin: Content Blocks (Custom Post Widget)

    I used another plugin, Better Search Replace, to find all the shortcodes created by amr and replaced them with the new shortcodes generated by Content Blocks (Custom Post Widget).

    The only instance in which Content Blocks (Custom Post Widget) was not helpful was when I specifically needed a widget to be put on a page or post. Otherwise, this plugin worked like a charm for me.

    I hope my answer is helpful to someone.

    ZLC

    (@kindnessville)

    Same concern. Jetpack just found a vulnerability with this plugin and will delete it. I’m leaving this comment here because I want an answer to Niko’s question too.

    Thread Starter ZLC

    (@kindnessville)

    Thank you! It worked perfectly. I hope you have a nice day too.

    Thread Starter ZLC

    (@kindnessville)

    Kelly,

    Thank you so much for looking into my issue. Your screenshot helped me resolve it. Sorry for the false alarm. I appreciate your help!

    In lovingkindness,
    Alex

Viewing 15 replies - 16 through 30 (of 79 total)