Pre-purchase questions

WCMp PDF Invoice

Pre-purchase questions Open

Viewing 3 reply threads
  • Author
    Posts
    • #110429
      Madalina
      Participant

      Hello, I’m looking to purchase the WCMP PDF Invoice Add-on but I have a few questions

      The plugin gives 2 templates for vendors – PDF invoice and PDF invoice for customers

      1. I only need to use the PDF invoice for customers and remove the PDF invoice – is this possible? As I only need vendors to see the pdf invoice for customers
      2. Is it possible to make PDF invoice for customers available only for specific vendors and not for all of them?
      3. At the moment, I’ve hidden the customer details in Wcmp – seller Dashboard – Orders page – Specific order as I don’t want the vendors to see the customer details but I would like the PDF invoice for customers to display the customer information. Is this possible to achieve?

      Thanks for the help,

    • #110453
      abhirup
      Moderator

      Hi,
      Our replies are inline:
      1. I only need to use the PDF invoice for customers and remove the PDF invoice – is this possible? As I only need vendors to see the pdf invoice for customers.
      >> Please add this code in the function.php of the current active theme :

      add_filter('wcmp_pdf_invoices_order_vendor_actions', 'wcmp_pdf_invoice_custom_invoice', 10, 2);
      function wcmp_pdf_invoice_custom_invoice( $pdf_action, $vendor_id ){
          unset($pdf_action['pdf_download']);
      return $pdf_action;
      }
      Copy

      2. Is it possible to make PDF invoice for customers available only for specific vendors and not for all of them?

      >> Using above filter you can also restrict the PDF invoice for customers.

      3. At the moment, I’ve hidden the customer details in Wcmp – seller Dashboard – Orders page – Specific order as I don’t want the vendors to see the customer details but I would like the PDF invoice for customers to display the customer information. Is this possible to achieve?

      >> You can override the template and modify as per your requirement.

      Regards,

    • #110459
      Madalina
      Participant

      Hi abhirup,

      Thanks a lot for your prompt response.

      In relation to point 2, how can the filter be used in order to make the PDF Invoice for Customer available only for some vendors and hidden for others in the vendor dashboard?

      Regards

    • #110507
      abhirup
      Moderator

      Hi,
      Using below code you can hide the vendor pdf and also restriction pdf for some vendors.

      Please add this code in the function.php of the current active theme :

      add_filter('wcmp_pdf_invoices_order_vendor_actions', 'wcmp_pdf_invoice_custom_invoice', 10, 3);
      function wcmp_pdf_invoice_custom_invoice( $pdf_action, $order_id, $vendor_id ){
        $vendors_id_for_showing_cus_pdf = array( 2, 4); // add vendor id who can see the customer pdf separeted by comma
        unset($pdf_action['pdf_download']);
          if( !in_array( $vendor_id, $vendors_id_for_showing_cus_pdf ) ){
            unset( $pdf_action['forcustomer_pdf_download']);
          }
      return $pdf_action;
      }
      Copy

      Regards,

Viewing 3 reply threads

Please LOGIN to reply to this topic

Buy all Marketplace addons together, check out our Bundle

Buy at Slashed Price