Paying
-
How to make sure that when paying for the ad, all the details are sent to the user’s mail?
-
I am not exactly sure, by all the details do you mean that the whole content from the [adverts_add] form? and to which email address you would like to send it to?
When a user adds an ad, he can choose a free option or a paid one, that’s when he selects a paid one, he needs to pay, he chooses a bank transfer, according to the standard you have 2 fields for filling: the user name and his mail.
His payment is also assigned a number, which he must specify in the transfer, but after that the person can not look at what number of his order to transfer the funds (he may have accidentally closed the window or not recorded). How can I make sure that the information that is published about his order is sent to his mail?You can try using adverts_payments_order_create filter for this
add_filter( "adverts_payments_order_create", "my_adverts_payments_order_create" ); function my_adverts_payments_order_create( $data ) { $payment_id = $data["payment_id"; $email = $data["form"]["adverts_email"]; $m = sprintf( "Your order number is %s. To pay %s.", $payment_id, $data["price"] ); wp_mail( $email, "Your order has been created.", $m ); return $data; }Where i should use it? When I added these in public_html/wp-content/plugins/wpadverts/addons/featured/featured.php site down. Sorry, I cant understand.
The code you should add in your theme functions.php file or create a new plugin and paste it there.
In the code itself there is a typo, use the one below instead
add_filter( "adverts_payments_order_create", "my_adverts_payments_order_create" ); function my_adverts_payments_order_create( $data ) { $payment_id = $data["payment_id"]; $email = $data["form"]["adverts_email"]; $m = sprintf( "Your order number is %s. To pay %s.", $payment_id, $data["price"] ); wp_mail( $email, "Your order has been created.", $m ); return $data; }The email body is
Your order number is %s. To pay %s.just update this phrase in the code snippet.
The topic ‘Paying’ is closed to new replies.