How to disable suborders for order status

MultivendorX

Open
Viewing 3 reply threads
  • Author
    Posts
    • #218842
      l.gan
      Participant

      In the Multivendor settings I have enabled: Orders – Display Suborder in mail. I also use HPOS.

      1. Is the filter still working?

      
      add_filter( 'woocommerce_email_recipient_customer_processing_order', 'disable_email_for_sub_order', 10,3 );
      
      function disable_email_for_sub_order( $recipient, $order, $object ){
         if( wp_get_post_parent_id( $order->get_id() ) ){
            return;
         } else {
            return $recipient;
         }
      }
      Copy

      For the order status “Processing”, I need the buyer (client) to receive only the parent order (1 letter). Suborders (for each suborder he should not receive 1 letter).

      Thus, if a client ordered from 3 suppliers, he will receive:

      1 letter with the main order, where its 3 suborders and the main order will be written. (template from ../wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-mvx-frontend.php). – OK.

      + and 3 more emails with suborders with an order for each suborder – not ok. I need to disable these 3 emails.

      2. How can you remove the border in the letter that comes to the buyer (client)? (erase the photo) and change the font?

      These are the email templates that are listed in ../wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-mvx-frontend.php
      line 1227 and 1242

      (email-order-details.php) and (order-details.php)

      I can’t redefine these templates – it doesn’t work.

    • #218863

      Our team is looking into this. Kindly give us some time.

    • #218876

      Kindly add the below code on your end and check the flow of email sent on your end –

      
      add_filter( 'woocommerce_email_recipient_customer_processing_order', 'disable_email_for_sub_order', 10,3 );
      
      function disable_email_for_sub_order( $recipient, $order, $object ){
         if( $order->get_parent_id()  ){
            return;
         } else {
            return $recipient;
         }
      }
      
      Copy

      Regarding the modifications in the email templates, you need to add customisations on those by overriding those template files. For any further assistance regarding the customisations in these templates kindly get in touch with the wooCommerce team. They will be able to assist you further accordingly.
      Let us know if you need any further assistance from our end.

      • #218878
        l.gan
        Participant

        Thank you, this helped, my issue is resolved, please close the topic.

    • #218879

      Great to hear that.
      It would be really great if you can give us 5/5 review here: https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/#new-post
      This would motivate the team further to do their job more efficiently.

Viewing 3 reply threads

Please LOGIN to reply to this topic