Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor kluver

    (@kluver)

    Hi @pierrebrezel,

    You can make use of the WooCommerce order key instead of the nonce by activating the ‘Allow guest access’ option via WooCommerce > PDF Invoices > Status.

    Your packing slip URL would then look something like this:

    $pdf_url = admin_url( 'admin-ajax.php?action=generate_wpo_wcpdf&template_type=packing-slip&order_ids=' . $order->get_id() . '&order_key=' . $order->get_order_key() );

    But this will only work for individual orders since the order key is related to only one order.

    • This reply was modified 4 years, 4 months ago by kluver.
    • This reply was modified 4 years, 4 months ago by kluver.
    Thread Starter pierrebrezel

    (@pierrebrezel)

    Hi @kluver ,

    many thanks for that hint.

    For me it’s important to get serveral delivery notes in one pdf, because we print delivery notes in a specific order (up to 100). We use that for tour planning and packing optimizations. I understand the idea using order keys instead of nonce. As the order key is related to only one order hat might not be a solutions for us. Unfortunately…

    Do you have something else in mind?

    Many thanks in advance for any kind of creativity! ??

    Plugin Contributor Ewout

    (@pomegranate)

    The only alternative would be to create your own (protected) URL/endpoint with a custom plugin, and then generating the bulk PDF there yourself:

    
    $packing_slip_bulk = wcpdf_get_document( 'packing-slip', $order_ids , true );
    $packing_slip_bulk->output_pdf()
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Download packing slips via URL’ is closed to new replies.