• Resolved xarliebrown

    (@xarliebrown)


    Hi again,

    Is it posible to disable the button “view online” from the mail sent with the pdf invoice? I would like to send them to clients only in pdf.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support slicedsupport

    (@slicedsupport)

    Hello

    It’s possible by modifying the original template. But please keep in mind that you have to make a copy of it into your theme folder so your original template will be safe when you update Sliced Invoices plugin.

    Plugin Author SlicedInvoices

    (@slicedinvoices)

    There is some example code which may help you on our Developers pages, here: https://slicedinvoices.com/developers/code-snippets/

    Specifically look for the code under “Example of using filters to customize email header and footer templates”. The “view online” button is actually part of the footer template, so you could remove it by inserting on your own custom footer.

    For example, if you take the custom footer code from the page I just mentioned, and you delete the button’s section of code, you would get something like this:

    add_filter( 'sliced_email_footer', 'sliced_custom_email_footer' );
    function sliced_custom_email_footer() {
    
    	$settings = get_option( 'sliced_emails' );
    	
    	$email_footer =  "</div><!-- End body_content_inner -->
    												</td>
    															</tr>
    													  </table><!-- End Content -->
    												 </td>
    											</tr>
    									  </table><!-- End Body -->
    								 </td>
    							</tr>
    						<tr>
    								<td align='center' valign='top' style='background:#f6f6f6;color:#444444;'>
    									  <!-- Footer -->
    									<table border='0' cellpadding='10' cellspacing='0' width='600' id='sliced_footer' >
    									<tr>
    										<td valign='top'>
    												 <table border='0' cellpadding='10' cellspacing='0' width='100%'>
    												 <tr>
    													  <td colspan='2' valign='middle' id='credit'>";
    														$email_footer .= wpautop( wp_kses_post( stripslashes( $settings['footer'] ) ) ) . "</td>
    												 </tr>
    												 </table>
    											</td>
    									  </tr>
    									  </table><!-- End Footer -->
    								 </td>
    							</tr>
    					  </table>
    				 </td>
    			</tr>
    	  </table>
    	  </div><!-- End Sliced Wrapper -->
    	 </body>
    	</html>";
    
    	return $email_footer;
    }

    Hope that helps!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘View Online button’ is closed to new replies.