Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ToPpS

    (@topps)

    I was poking around and seem to have found the file “class-wcdn-print.php” where to change this…?

    // Set the template type arg.
    foreach ( self::$template_registrations as $template_registration ) {
    if ( $template_type === $template_registration[‘type’] && ‘order’ !== $template_type ) {$args = wp_parse_args( array( ‘print-order-type’ => $template_type ), $args );
    break;
    }
    }

    // Set the email arg.
    if ( ! empty( $order_email ) ) {
    $args = wp_parse_args( array( ‘print-order-email’ => $order_email ), $args );
    }`

    Would the change be ??:

    // Set the email arg.
    if ( ! empty( $order_email ) ) {
    $args = wp_parse_args( array( ‘print-order-email’ => $order_email ) && ‘order’ !== $template_type ) {$args = wp_parse_args( array( ‘print-order-type’ => $template_type ), $args );
    }

    Thread Starter ToPpS

    (@topps)

    Any feedback? @wpupen

    Plugin Support Upendra Kapse

    (@wpupen)

    Hi @topps,

    First of all, regarding the difference in the Invoice are you referring to the fact that from the email link the Invoice you see is of full width while when printed from the admin side it is the boxed size? Apart from that, contentwise both the Invoices are the same.

    The thing is the URLs for frontend and backend are different and they generally have different parameters too. But I showing the code change that you have mentioned to our developer and I will get back to you on this once I hear back from them.

    Also, can you tell me what exact change you made manually to the Open print view in browser link when the Invoice appeared correctly for you?

    Kind Regards,
    Upendra.

    Thread Starter ToPpS

    (@topps)

    Hey @wpupen
    Thank you for the reply.

    The main issue is that the text/heading changes on the page.
    The link at the footer of the email shows an invoice with “ORDER” heading, whereas the client needs it to say “Invoice”. they send this with the shipment as a tax invoice/legal requirement. So it has to read “invoice or tax invoice”.

    The page can be accessed correctly from the Edit Order page of WooCommerce (as mentioned above). But the client chooses to access the page via the email link which is more convenient than working through the backend of the site. So just trying to make sure that no matter which route they take, they can print off the same page.

    I did edit the different URLs manually and test them in the browser and the resultant page were correct. The key change seemed to be adding “&print-order-type=invoice” to the email link.

    This was the tested change to the Open print view in browser

    
    https://www.website.url/my-account/print-order/58569/?print-order-email=somerandomemailaddress&print-order-type=invoice
    

    I haven’t edited the PHP doc yet as I don’t want to impact the live environment of the site. Hence I wanted to run the change past you first before any edits were made.

    Thread Starter ToPpS

    (@topps)

    Hi @wpupen
    Was this issue fixed in the latest update?

    Plugin Support Upendra Kapse

    (@wpupen)

    Hi @topps,

    No, I am afraid this change was not done in the recent update of the plugin. The update had some fixes that were already locked in earlier.

    But I am asking our developer to look into this and I will surely update you here this week.

    Kind Regards,
    Upendra.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Email Link different to Order Page link’ is closed to new replies.