Title: outmaster's Replies | WordPress.org

---

# outmaster

  [  ](https://wordpress.org/support/users/outmaster/)

 *   [Profile](https://wordpress.org/support/users/outmaster/)
 *   [Topics Started](https://wordpress.org/support/users/outmaster/topics/)
 *   [Replies Created](https://wordpress.org/support/users/outmaster/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/outmaster/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/outmaster/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/outmaster/engagements/)
 *   [Favorites](https://wordpress.org/support/users/outmaster/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] How do I separate 2 types of taxes?](https://wordpress.org/support/topic/how-do-i-separate-2-types-of-taxes/)
 *  Thread Starter [outmaster](https://wordpress.org/support/users/outmaster/)
 * (@outmaster)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/how-do-i-separate-2-types-of-taxes/#post-13635552)
 * Hello again
 * I have figured out a way.
 *     ```
       <?php 
       $num1 = $order->get_subtotal();
       $num2 = $order->get_total_tax();
       $num3 = 100;
       $num4 = 7;
       echo number_format( $num1 - ($num2 * $num3 / $num4) , 2);
       ?>
       ```
   
 * Thanks for the great plugin.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] How do I separate 2 types of taxes?](https://wordpress.org/support/topic/how-do-i-separate-2-types-of-taxes/)
 *  Thread Starter [outmaster](https://wordpress.org/support/users/outmaster/)
 * (@outmaster)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/how-do-i-separate-2-types-of-taxes/#post-13634640)
 * Hello!
 * I have already purchased a Premium Templates extension. Everything works very
   well. But I would like to ask one more thing.
 * I have 2 types of web product tax forms:
    1.VAT 0% 2.VAT 7%
 * What if I want to separate the total price of all products under VAT 0% (excluding
   VAT 7% group) to be displayed in the TOTALS field? Do you have any advice?
 * Thank you
 * [https://photos.app.goo.gl/oLJhPXpvwz7T81h47](https://photos.app.goo.gl/oLJhPXpvwz7T81h47)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Add Custom Javascript to invoice template](https://wordpress.org/support/topic/add-custom-javascript-to-invoice-template/)
 *  Thread Starter [outmaster](https://wordpress.org/support/users/outmaster/)
 * (@outmaster)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-custom-javascript-to-invoice-template/#post-13241845)
 * I tried this, now it works as I want.
 *     ```
       <td>
       <?php do_action( 'custom_amount_in_words', $this->type, $this->order ); ?>
       </td>
       ```
   
 * and
 *     ```
       add_action ( 'custom_amount_in_words', 'wpo_wcpdf_spell_out_total', 10, 2);
       function wpo_wcpdf_spell_out_total ($template_type, $order) {
       	if ( in_array( $template_type, array( 'invoice', 'credit-note' ) ) ) {
       		$f = new NumberFormatter("en", NumberFormatter::SPELLOUT);
       		$spelled_out_total = $f->format($order->get_total());
       		echo "<p><strong>Amount in words:</strong><br>" . $spelled_out_total . "</p>";
       	}
       }
       ```
   
 * Thank you so much
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PDF Invoices & Packing Slips for WooCommerce] Add Custom Javascript to invoice template](https://wordpress.org/support/topic/add-custom-javascript-to-invoice-template/)
 *  Thread Starter [outmaster](https://wordpress.org/support/users/outmaster/)
 * (@outmaster)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-custom-javascript-to-invoice-template/#post-13241703)
 * Thanks for the advice
 * I put your example in the theme’s functions.php, It works
 * But now I have created HTML fields for signing at the end of Invoice.
 * That makes the total amount in words not in the desired position.
 * If I am converting from your sample filter to PHP, put it in the invoice template,
   what do I do?

Viewing 4 replies - 1 through 4 (of 4 total)