Hook Quote/Invoice Link in Email
-
Hello, I was wondering how to hook in the quote/invoice link into a custom email template. I couldn’t find any email templates in this plugin files. Here’s code I have but I’m having issues.
<?php $order_status = $order_obj->get_status(); if ( 'pending' === $order_status ) : ?> <p> <?php // translators: Quote/Invoice Link Url. echo sprintf( esc_html__( 'To view the quote for this order please use the following link: %s', 'quote-wc' ), '<a href="' . esc_url( $order_obj->sliced_get_the_link( $id ) ) . '">' . esc_html__( 'View Quote', 'quote-wc' ) . '</a>' ); ?> </p> <?php endif; ?>
Here’s another variation:
add_action( 'woocommerce_email_before_order_table', 'display_quote_link', 15 ); function display_quote_link( $order ) { echo sprintf( esc_html__( 'To view the quote for this order please use the following link: %s', 'quote-wc' ), '<a href="' . esc_url( $order_obj->sliced_get_the_link( $id ) ) . '">' . esc_html__( 'View Quote', 'quote-wc' ) . '</p>'; }
I found the tag template on this site https://slicedinvoices.com/support/template-tags/ .
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Hook Quote/Invoice Link in Email’ is closed to new replies.