In the file includes/class-wcdn-print.php:
Replace the function get_print_page_url with this one.
/**
* Get print page url
*/
public function get_print_page_url( $order_ids, $template_type = 'order', $order_email = null ) {
// Explode the ids when needed
if( !is_array( $order_ids ) ) {
$order_ids = array_filter( explode( '-', $order_ids ) );
}
// Default args
$args = array();
if( in_array( $template_type, $this->template_types ) && $template_type != 'order' ) {
$args = wp_parse_args( array( 'print-order-type' => $template_type ), $args );
}
if( !empty( $order_email ) ) {
$args = wp_parse_args( array( 'print-order-email' => $order_email ), $args );
}
// Generate the url
$permalink = get_permalink( wc_get_page_id( 'myaccount' ) );
$permalink = str_replace( home_url(), "", $permalink );
$endpoint = $this->api_endpoints['print-order'];
$order_ids_slug = implode( '-', $order_ids );
if( get_option( 'permalink_structure' ) ) {
$url = trailingslashit( trailingslashit( $permalink ) . $endpoint . '/' . $order_ids_slug );
} else {
$url = add_query_arg( $endpoint, $order_ids_slug, $permalink );
}
$url = add_query_arg( $args, $url );
return $url;
}