Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › Vendor Email Notification
Tagged: email, notification, payment pethod, vendor
- This topic has 3 replies, 2 voices, and was last updated 4 years, 7 months ago by WCFM Forum.
Viewing 3 reply threads
- AuthorPosts
- March 30, 2020 at 11:43 pm #114140SiuilARuinParticipant
Is that possible to add the “payment method” of the order, in the email of the order notification that the vendor gets in his email?
- April 2, 2020 at 8:09 pm #114747WCFM ForumMember
Yeah possible, where you want to show this? At top or bottom?
- April 2, 2020 at 11:41 pm #114860SiuilARuinParticipant
At the top it would be fine 🙂
- April 4, 2020 at 1:27 pm #115276WCFM ForumMember
Please add this code snippet to your site and take a look –
add_action ( 'wcfm_order_totals_after_total', function( $order_id ) { $order = wc_get_order( $order_id ); if ( WC()->payment_gateways() ) { $payment_gateways = WC()->payment_gateways->payment_gateways(); } else { $payment_gateways = array(); } $payment_method = ! empty( $order->get_payment_method() ) ? $order->get_payment_method() : ''; $td_style = ''; if( $payment_method ) { ?> <tr> <th class="label" colspan="2" style="text-align:right; <?php echo $td_style; ?>"><?php _e( 'Payment Method', 'wc-frontend-manager' ); ?>:</th> <td class="total" style="text-align:center; <?php echo $td_style; ?>"> <div class="view"> <?php echo isset( $payment_gateways[ $payment_method ] ) ? esc_html( $payment_gateways[ $payment_method ]->get_title() ) : esc_html( $payment_method ); ?> </div> </td> </tr> <?php } }, 50 );
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin –Â https://wordpress.org/plugins/code-snippets/Thank You
- AuthorPosts
Viewing 3 reply threads
- You must be logged in to reply to this topic.