Support » Plugin: WCFM Marketplace - Best Multivendor Marketplace for WooCommerce » Vendor New Store Order – Doesn’t show Payment method

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WC Lovers

    (@wclovers)

    Kindly add this snippet to your site for the purpose-

    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 custom code(s) to your child theme’s functions.php
    In case you do not have child theme then add those using this plugin – https://wordpress.org/plugins/code-snippets/

    Thread Starter Infinitech s.a de c.v

    (@infinitechsv)

    Thank You it works Grate

    Plugin Author WC Lovers

    (@wclovers)

    Glad to know 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Vendor New Store Order – Doesn’t show Payment method’ is closed to new replies.