Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hello @elias1435

    By Credit Card name you mean the type? (eg. Visa)

    Thread Starter elias1435

    (@elias1435)

    yes

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @elias1435,

    My apologies for the very late reply. Did you finally manage to display the credit card name as you wanted? If not, you can try to achieve it with this code snippet:

    /**
     * PDF Invoices & Packing Slips for WooCommerce:
     * Displays the card type next to the payment method name
     */
    add_filter( 'wpo_wcpdf_payment_method', function( $payment_method, $document ) {
    	if ( $card_type = $document->order->get_meta( 'card_type_order_saved' ) ) {
    		$payment_method .= " ({$card_type})";
    	}
    	return $payment_method;
    }, 10, 2 );

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add Credit card name to Payment Method’ is closed to new replies.