download pdf invoice via rest api

[ad_1]

hello everyone,

add_action( ‘wpo_wcpdf_before_document’, function( $document_type, $order ) { if( !empty($order) && $document_type == ‘invoice’ ) { $debug_settings = get_option(‘wpo_wcpdf_settings_debug’, array()); if( isset($debug_settings[‘guest_access’]) ) { $pdf_url = admin_url( ‘admin-ajax.php?action=generate_wpo_wcpdf&template_type=’.$document_type.’&order_ids=’ . $order->get_id() . ‘&order_key=’ . $order->get_order_key() ); update_post_meta( $order->get_id(), ‘_wcpdf_document_link’, esc_attr($pdf_url) ); } } }, 10, 2 );

using this snippet i got roboman.in/wp-admin/admin-ajax.php?action=generate_wpo_wcpdf&document_type=invoice&order_ids=5412&access_key=b703520b1
using api but no pdf downloading or not showing any pdf

showing You do not have sufficient permissions to access this page.
can i want to give permission using customer id?
or download with out permission.
also already give permission to Allow guest access

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer