Created
May 10, 2018 06:11
-
-
Save vidishpurohit/4973f69cc21ef34ca4271d26f38dacbf to your computer and use it in GitHub Desktop.
add subtotal to edit order admin woocommerce
This file contains 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
/* | |
* This code will add subtotal to edit order admin woocommerce. | |
* Author: WooExtend | |
* Date: 13-02-2018 | |
*/ | |
add_action( 'woocommerce_admin_order_totals_after_discount', 'vp_add_sub_total', 10, 1); | |
function vp_add_sub_total( $order_id ) { | |
$order = wc_get_order( $order_id ); | |
?><tr> | |
<td class="label">Subtotal:</td> | |
<td width="1%"></td> | |
<td class="total"><?php echo wc_price($order->get_subtotal());?></td> | |
</tr><?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment