Title: create document like invoice.php
Last modified: January 12, 2021

---

# create document like invoice.php

 *  [hs777it](https://wordpress.org/support/users/hs777it/)
 * (@hs777it)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/create-document-like-invoice-php/)
 * Hello,
    by this code filter i was added new button in listing action
 *     ```
       // Add your custom order status action button (for orders with "processing" status)
       add_filter( 'woocommerce_admin_order_actions', 'add_custom_order_status_actions_button', 100, 2 );
       function add_custom_order_status_actions_button( $actions, $order ) {
       	if ( $order->get_status() == 'trash' ) {
       			return;
       		}
           // Display the button for all orders that have a 'processing' status
           //if ( $order->has_status( array( 'processing','completed' ) ) ) {
   
               // Get Order ID (compatibility all WC versions)
               $order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;
               // Set the action button
               $actions['certificate'] = array(
                   'url'       => wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce_mark_order_status&status=certificate&order_id=' . $order_id ), 'woocommerce-mark-order-status' ),
                   'name'      => __( 'Print Certificate', 'woocommerce' ),
                   'action'    => "view certificate", // keep "view" class for a clean button CSS
               );
           //}
           return $actions;
       }
   
       // Set Here the WooCommerce icon for your action button
       add_action( 'admin_head', 'add_custom_order_status_actions_button_css' );
       function add_custom_order_status_actions_button_css() {
           echo '<style>.view.certificate::after { font-family: woocommerce; content: "\f121" !important; }</style>';
       }
       ```
   
 * I hope someone help me to generate custom document like invoice.php
 * thanks in advance

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [alexmigf](https://wordpress.org/support/users/alexmigf/)
 * (@alexmigf)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/create-document-like-invoice-php/#post-13896427)
 * Hello [@hs777it](https://wordpress.org/support/users/hs777it/)
 * Custom documents require custom development, is not possible to achieve that 
   with a simple code snippet, but with our [Professional extension](https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-professional/)
   you get the “Proforma” document that you can use as an extra document.

Viewing 1 replies (of 1 total)

The topic ‘create document like invoice.php’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [alexmigf](https://wordpress.org/support/users/alexmigf/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/create-document-like-invoice-php/#post-13896427)
 * Status: not resolved