Last active
January 31, 2019 20:34
-
-
Save mahbubme/55d518ee57a70958f769 to your computer and use it in GitHub Desktop.
Include shop name in WooCommerce new order email ( Dokan Plugin ).
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
<?php | |
function order_email_include_shop_name( $order ) { | |
$seller_id = dokan_get_seller_id_by_order( $order->id ); | |
if ( $seller_id !== 0 ) { | |
$store_info = dokan_get_store_info( $seller_id ); | |
?> | |
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee"> | |
<tfoot> | |
<tr> | |
<th scope="row" style="text-align:left; width: 57%; border: 1px solid #eee; <?php echo 'border-top-width: 4px;'; ?>"><?php _e( 'Store Name:' ); ?></th> | |
<td style="text-align:left; border: 1px solid #eee; <?php echo 'border-top-width: 4px;'; ?>"><?php echo esc_html( $store_info['store_name'] ); ?></td> | |
</tr> | |
</tfoot> | |
</table> | |
<?php | |
} | |
} | |
add_action( 'woocommerce_email_after_order_table', 'order_email_include_shop_name' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment