Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question