F
F
fortune_djuwat2015-12-01 23:18:42
WordPress
fortune_djuwat, 2015-12-01 23:18:42

How to attach payment services code in Function.PHP?

Help others! How to fasten the sending of messages about the payment method to e-mail to customers who have made an order, you need to insert the code in function.php. there is a code, but it’s not clear how to do it, as soon as I haven’t tried it, there’s always one site crash.
Here is the code----------------------
function functionsphp_head_info(){
echo "\n\n";
}
add_action('wp_head', 'functionsphp_head_info');
add_action( 'woocommerce_email_before_order_table', 'add_order_email_instructions', 10, 2 );
function add_order_email_instructions( $order, $sent_to_admin ) {
if ( ! $sent_to_admin ) {
if ( 'bacs' == $order->payment_method ) {
//STANDART MESSAGE
} else {
// other methods (ie credit card)
echo 'Transfer money to a Sberbank of Russia card. Your order will not be shipped until the funds have been credited to our account.
Maestro Card Number: **** **** **** ****
Cardholder's full name: IVAN IVANOVICH PUPKIN';
}
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly B, 2015-12-26
@vitaliy_balahnin

wp-kama.ru/function/wp_mail

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question