• Resolved bitma

    (@bitma)


    I have the Subscriptions plugin installed. New subscribers get an email for processing order if they join at the same day as Synchronise Renewals (Saturday) . The other days are not a problem as their first order will be a renewal order which I have disabled emails for.

    Can I change that somehow? I still want the order email to be sent for normal orders (non-subscriptions).

    I was making some quick tests by including some code like this to the email template:

    if (strpos($order, ‘PREMIUM’) !== false) {
    exit;
    }

    I couldn’t get it to work. But I am sure it must be possible somehow.

    Thanks,

    Andreas

Viewing 1 replies (of 1 total)
  • Thread Starter bitma

    (@bitma)

    I managed to fix this with this simple plugin I made:

    function wc_disable_new_order_email_for_subscribers( $recipient, $order ) {
    global $woocommerce;
    if (current_user_can( ‘subscriber’ )) {
    $recipient = “”;
    }
    return $recipient;
    }

    add_filter(‘woocommerce_email_recipient_customer_processing_order’, ‘wc_disable_new_order_email_for_subscribers’, 1, 2);

Viewing 1 replies (of 1 total)
  • The topic ‘Disable emails for subscriptions – but not for normale orders’ is closed to new replies.