• Resolved shopmaster

    (@serdarozbilen)


    Hi,

    1 – Still sending failed orders to vendors as new order email. I updated latest version. And you wrote solved. But still sends.

    2- In New Order Mail “A new order was received and marked as processing from” sentences can’t be translateble. Rather, we can translate iton loco translate but mails still shows in english.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Dualcube

    (@dualcube)

    Hi @serdarozbilen, our replies are inline :

    1 – Still sending failed orders to vendors as new order email. I updated the latest version. And you wrote solved. But still sends.

    >> We have retested the flow on our end, as you can see we didn’t get any pending order mail for vendors : https://www.loom.com/share/a746790e3df143399c0f4cb6d1c4846b

    Can you please recheck again.

    2- In New Order Mail “A new order was received and marked as processing from” sentences can’t be translatable. Rather, we can translate iton loco translate but mails still shows in english.

    >> We have checked the strings, you need to translate this string :
    A new order was received and marked as %s from %s. Their order is as follows:

    Thread Starter shopmaster

    (@serdarozbilen)

    Hi,

    1 – I didn’t say panding payment. I said failed order.
    2- Yes I know, I translated but didn’t work : https://pasteboard.co/IHxdr3A.jpg

    • This reply was modified 5 years ago by shopmaster.
    Thread Starter shopmaster

    (@serdarozbilen)

    You can see both of issue in same order @dualcube

    1 – Vendors getting failed order email as new email
    2- Translate does not work

    https://pasteboard.co/IHPoE8f.jpg
    https://pasteboard.co/IHPoQtp.jpg

    Will you answer ?

    Dualcube

    (@dualcube)

    @serdarozbilen, thanks for your co-operation.

    In our last update, we have removed the email for the canceled order, not for the failed order. Our team will look into this.

    I will keep you posted.

    Thread Starter shopmaster

    (@serdarozbilen)

    Hello,

    Any development ? My vendors sending email which they shipped orders via emails. Now they are asking for money. So how can we explain they got failed order emails as new order ?

    Rajsekhar Chatterjee

    (@rajsekharchatterjee11)

    Hi @serdarozbilen,
    Please use this code in your current active themes functions.php file to stop failed new order email.

    /*******************  Disable email for failed order ****************/
    add_filter( 'woocommerce_email_recipient_vendor_new_order', 'disable_email_for_failed_orders', 10,3 );
    function disable_email_for_failed_orders( $recipient, $order, $object ){
      if( $order->get_status() == 'failed' ){
        return;
      } else {
        return $recipient;
      }
    }

    And we will fix this issue in our next update

    Thread Starter shopmaster

    (@serdarozbilen)

    Hello @rajsekharchatterjee11

    I added but payment screen locked after this function. You realesed new version. did you fix this issue ?

    Thanks

    @serdarozbilen, sorry use this updated code :

    function restrict_vendor_new_order_mail( $recipient, $order ) {
       if( $order->get_status() == 'failed' ) {
    return;
    } else {
    return $recipient;
    }
    }
    add_filter('woocommerce_email_recipient_vendor_new_order', 'restrict_vendor_new_order_mail', 1, 2);
    Thread Starter shopmaster

    (@serdarozbilen)

    Hello
    When I add this code to functions.php then prevents succes order proccess and
    “your site is experiencing a technical issue” message appears.

    Woocommerce log :

    2020-03-07T21:40:48+00:00 CRITICAL /var/www/html/wp-content/themes/xxx-child/functions.php dosyas?nda 897 numaral? sat?rda Uncaught Error: Call to a member function get_status() on null in /var/www/html/wp-content/themes/xxx-child/functions.php:897
    Stack trace:
    #0 /var/www/html/wp-includes/class-wp-hook.php(288): restrict_vendor_new_order_mail(NULL, NULL)
    #1 /var/www/html/wp-includes/plugin.php(208): WP_Hook->apply_filters(NULL, Array)
    #2 /var/www/html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(398): apply_filters('woocommerce_ema...', NULL, NULL, Object(WC_Email_Vendor_New_Order))
    #3 /var/www/html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/emails/class-wcmp-email-vendor-new-order.php(84): WC_Email->get_recipient()
    #4 /var/www/html/wp-content/themes/xxx-child/functions.php(646): WC_Email_Vendor_New_Order->trigger(254324)
    #5 /var/www/html/wp-includes/class-wp-hook.php(288): trigger_mail_after_process_order(254324)
    #6 /var/www/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #7 /var/www/html/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #8 /var/www/ht
    • This reply was modified 4 years, 8 months ago by shopmaster.
    Thread Starter shopmaster

    (@serdarozbilen)

    Hello,

    Please a solution. Too many vendor ships failed orders. And then they ask ther money to us!.

    @serdarozbilen, please use this updated code and check if there is any more error :

    function restrict_vendor_new_order_mail( $recipient, $order ) {
       if( $order->get_status() == 'failed' ) {
         return;
       } else {
         return $recipient;
       }
     }
     add_filter('woocommerce_email_recipient_vendor_new_order', 'restrict_vendor_new_order_mail', 10, 2);
    Thread Starter shopmaster

    (@serdarozbilen)

    wordpress site is experiencing technical difficulties

    I think you don’t check your code.
    Please try checkout. You will see. Then write pls.

    Log :
    “Uncaught Error: Call to a member function get_status() on null”

    • This reply was modified 4 years, 8 months ago by shopmaster.

    Sorry @serdarozbilen, we missed a checking.

    Kindly use this updated code :

    function restrict_vendor_new_order_mail( $recipient, $order ) {
    	if( !is_admin() ){
           if( $order->get_status() == 'failed' ) {
             return;
           } else {
             return $recipient;
           }
         }
     }
     add_filter('woocommerce_email_recipient_vendor_new_order', 'restrict_vendor_new_order_mail', 10, 2);
    Thread Starter shopmaster

    (@serdarozbilen)

    Hi did you update this problem in latest version ?

    Your code still doesn’t work. I think you didn’t check. Log as below :
    And what will happen if order payment is successful after some time ?

    2020-06-19T06:50:58+00:00 CRITICAL /var/www/html/wp-content/themes/child/functions.php Uncaught Error: Call to a member function get_status() on null in /var/www/html/wp-content/themes/child/functions.php:806
    Stack trace:
    #0 /var/www/html/wp-includes/class-wp-hook.php(289): restrict_vendor_new_order_mail(NULL, NULL)
    #1 /var/www/html/wp-includes/plugin.php(206): WP_Hook->apply_filters(NULL, Array)
    #2 /var/www/html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(398): apply_filters(‘woocommerce_ema…’, NULL, NULL, Object(WC_Email_Vendor_New_Order))
    #3 /var/www/html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/emails/class-wcmp-email-vendor-new-order.php(84): WC_Email->get_recipient()
    #4 /var/www/html/wp-content/themes/child/functions.php(558): WC_Email_Vendor_New_Order->trigger(262891)
    #5 /var/www/html/wp-includes/class-wp-hook.php(289): trigger_mail_after_process_order(262891)
    #6 /var/www/html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #7 /var/www/html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)

    • This reply was modified 4 years, 5 months ago by shopmaster.
Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Failed Order Email to Vendor’ is closed to new replies.