• Resolved bartskol

    (@bartskol)


    Hi!
    I have a problem with this plugin. It doesn’t show required information.
    It needs to clearly describe:
    Who is a buyer|
    Who is a seller
    Buyers address
    Needs to says “Date of issue” in polish ofc.
    How can i add that to the template ?
    Where can i put text in the php template invoice.php to add that text before the rows of information that plugin is creating.
    Example of what I need:
    Example

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor kluver

    (@kluver)

    Hi @bartskol,

    Sure that is certainly possible. To add ‘Seller: ‘ to your shop name you can use the following code snippet:

    add_filter( 'wpo_wcpdf_shop_name_settings_text', 'wpo_wcpdf_shop_name_settings_text', 10, 3 );
    function wpo_wcpdf_shop_name_settings_text( $shop_name, $document ) {
    	if ( $document->type == 'invoice' ) {
    		$shop_name = 'Seller: ' . $shop_name;
    	}
    	return $shop_name;
    }

    To add ‘Billing address’ and ‘Buyer: ‘ to the billing address you can use the following code snippet:

    add_action( 'wpo_wcpdf_before_billing_address', 'wpo_wcpdf_before_billing_address', 10, 2 );
    function wpo_wcpdf_before_billing_address( $template_type, $order ) {
    	if ( $template_type == 'invoice' ) {
    		printf( '<h3>%s</h3>', __( 'Billing Address', 'woocommerce-pdf-invoices-packing-slips' ) );
    		printf( '<p>%s</p>', __( 'Buyer:', 'woocommerce-pdf-invoices-packing-slips' ) );
    	}
    }

    These code snippets should be placed in the functions.php of your child theme. If you haven’t worked with code snippets or functions.php before please read this: How to use filters

    To create a custom translation for the ‘Invoice date:’ label please read this: Using custom translations

    Thread Starter bartskol

    (@bartskol)

    Hi Kluver!
    Thank you very much, this indeed was very easy and straight forward and my problem is now solved.
    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“Billing address” Not shown in Polish’ is closed to new replies.