Last active
August 19, 2019 11:51
-
-
Save iamsathyaseelan/53cb05211cae50b2a67f3b23ff6cff0e to your computer and use it in GitHub Desktop.
Code snippet to show next order coupon while printing invoice using "WooCommerce Print Invoice & Delivery Note"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 1. wcdn_after_branding => After the invoice logo | |
* 2. wcdn_after_addresses => After displaying the billing and shipping address | |
* 3. wcdn_after_info => After order details | |
* 4. wcdn_after_items => After the order items table | |
* 5. wcdn_after_notes => After the order notes | |
* 6. wcdn_after_thanks => After thanks | |
* 7. wcdn_after_colophon => After colophon | |
* | |
* Replace `wcdn_after_addresses` with any other mentioned hooks to change the display position | |
*/ | |
add_action('wcdn_after_addresses',function($order){ | |
do_action('rnoc_show_order_coupon',$order,true,'',''); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment