Alles anzeigenHi,
danke für den Denkanstoß. Ich habe nun einfach das template für die e-mail ausgetauscht ([COLOR=#333333][FONT=Open Sans]customer-processing-order.php)[/FONT][/COLOR].
Die Zeile do_action( ‘woocommerce_email_before_order_table’, $order, $sent_to_admin, $plain_text );
habe ich einfach gegen das getauscht:
Code Alles anzeigen// which method was chosen? $payment = get_post_meta( $order->id, '_payment_method', true );; if ($payment == 'bacs'){ // we need additional informations $payment_gateway = wc_get_payment_gateway_by_order( $order ); echo wpautop( wptexturize( $payment_gateway->instructions ) ) . PHP_EOL; echo '<h2>' . __( 'Our Bank Details', 'woocommerce' ) . '</h2>' . PHP_EOL; $bacs_accounts = apply_filters( 'woocommerce_bacs_accounts', $payment_gateway->account_details ); if ( ! empty( $bacs_accounts ) ) { foreach ( $bacs_accounts as $bacs_account ) { $bacs_account = (object) $bacs_account; echo '<ul class="order_details bacs_details">' . PHP_EOL; // show BAC information in emails $account_fields = apply_filters( 'woocommerce_bacs_account_fields', array( 'account_name' => array( 'label' => __( 'Account Name', 'woocommerce' ), 'value' => $bacs_account->account_name ), 'bank_name' => array( 'label' => __( 'Bank Name', 'woocommerce' ), 'value' => $bacs_account->bank_name ), 'account_number'=> array( 'label' => __( 'Account Number', 'woocommerce' ), 'value' => $bacs_account->account_number ), 'sort_code' => array( 'label' => __( 'Sort Code', 'woocommerce' ), 'value' => $bacs_account->sort_code ), 'iban' => array( 'label' => __( 'IBAN', 'woocommerce' ), 'value' => $bacs_account->iban ), 'bic' => array( 'label' => __( 'BIC', 'woocommerce' ), 'value' => $bacs_account->bic ) ), $order_id ); foreach ( $account_fields as $field_key => $field ) { if ( ! empty( $field['value'] ) ) { echo '<li class="' . esc_attr( $field_key ) . '">' . esc_attr( $field['label'] ) . ': <strong>' . wptexturize( $field['value'] ) . '</strong></li>' . PHP_EOL; } } echo '</ul>'; } } }Quick and dirty. ;)
Vielleicht hilft das auch mal wem anders.
Gruß Christian
Hi Leute, ich möchte zwischen den Zeilen von den aus Woocommerce 'eingeholten' Bankdaten, noch eine zusätzliche schweizerische Zahlungsmethode hineinfügen, nämlich bloss 'TWINT:076xxxxxxxx'. Weil der obigen Code nicht aus Texte bestehen sondern nur Codes, weiss ich nicht wie das machen soll, wie geht das? Etwas mit echo text oder so was?