Vendor Email Notification

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM Vendor Email Notification

Viewing 3 reply threads
  • Author
    Posts
    • #114140
      SiuilARuin
      Participant

      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?

    • #114747
      WCFM Forum
      Member

      Yeah possible, where you want to show this? At top or bottom?

    • #114860
      SiuilARuin
      Participant

      At the top it would be fine 🙂

    • #115276
      WCFM Forum
      Member

      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

Viewing 3 reply threads
  • You must be logged in to reply to this topic.