PITCHEDsenses
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Issue with calculating invoice since update 2.6Thanks, don’t know why I didn’t get a notice about the update.
Works now ??Forum: Plugins
In reply to: [WooCommerce] Payment methods in accountThanks for your fast reply! Glad to hear that ??
However it would be nice to link that how I would like. Maybe you could think about that in your update.
With best regards
Eric
Thanks for your help angelleye.
I am not getting any email when I add your code into my function.
The code looks like that now:
function update_wc_order_status($posted) { $order_id = isset($posted['invoice']) ? str_replace('ODL-','',$posted['invoice']) : ''; if(!empty($order_id)) { $order = new WC_Order($order_id); $order->update_status('on-hold'); $to = 'placeholder for my email, I removed it here for privacy'; $subject = 'Email from PayPal IPN'; $message = 'The IPN was hit'; $message .= "\n" . print_r($posted,true); wp_mail( $to, $subject, $message ); } } add_action('paypal_ipn_for_wordpress_payment_status_completed', 'update_wc_order_status', 10, 1);
Ah, I get what you mean!
Alright, I added it and get to you back when I got something new.Yes!
[payment_status] => Completed
What do you mean by adding a mail in which function?
What code do I have to put where? (sorry for my inexperience)Yeah, these are all I got in my mail (I removed the content after “=>” due to privacy protection):
??? [mc_gross] =>
??? [protection_eligibility] =>
??? [address_status] =>
??? [item_number1] =>
??? [payer_id] =>
??? [tax] =>
??? [address_street] =>
??? [payment_date] =>
??? [payment_status] =>
??? [charset] =>
??? [address_zip] =>
??? [mc_shipping] =>
??? [first_name] =>
??? [mc_fee] =>
??? [address_country_code] =>
??? [address_name] =>
??? [notify_version] =>
??? [custom] =>
??? [payer_status] =>
??? [business] =>
??? [address_country] =>
??? [num_cart_items] =>
??? [address_city] =>
??? [verify_sign] =>
??? [payer_email] =>
??? [txn_id] =>
??? [payment_type] =>
??? [last_name] =>
??? [address_state] =>
??? [item_name1] =>
??? [receiver_email] =>
??? [payment_fee] =>
??? [quantity1] =>
??? [receiver_id] =>
??? [txn_type] =>
??? [mc_gross_1] =>
??? [mc_currency] =>
??? [residence_country] =>
??? [receipt_id] =>
??? [transaction_subject] =>
??? [payment_gross] =>
??? [ipn_track_id] =>Hi,
I did what you said and I just got a mail “Email from PayPal IPN” with “The IPN was hit , Array……. and a list with a lot of codes. May I mail you the content somewhere?
Or what shall I do now?
The payment status is set to “completed”, I see it in the backend “PayPal IPN”.
I indeed use a prefix, but I adjusted that in the function.In PayPal Plus, in Woocommerce, the prefix is set to “ODL-“
my function looks like this:
function update_wc_order_status($posted) {
$order_id = isset($posted[‘invoice’]) ? str_replace(‘ODL-‘,”,$posted[‘invoice’]) : ”;
if(!empty($order_id)) {
$order = new WC_Order($order_id);
$order->update_status(‘on-hold’);
}
}
add_action(‘paypal_ipn_for_wordpress_payment_status_completed’, ‘update_wc_order_status’, 10, 1);I wrote this function in my functions.php of my child theme, that is also active on my site.
I can see IPNs when I click in the backend on “PayPal IPN”.
I see the Transaction IDs etc… listed.It’s not working. I tried an order and I still get my orders directly to “processing” in Woocommerce.
Thanks, what about the last line?
add_action(‘paypal_ipn_for_wordpress_payment_status_completed’, ‘update_wc_order_status’, 10, 1);
do I have to change it, too?
Thanks for your fast reply!
I installed your IPN for WordPress plugin and I also did the settings in PayPal.
Now I wanted to copy your snippet into my functions.php but in your documentation, you say:“From now on, any orders that come through PayPal and have a matching WooCommerce Order will automatically update the order status to Completed!”
How can I change that order status to “on hold” ?
[Edit] maybe like this?
function update_wc_order_status($posted) {
$order_id = isset($posted[‘invoice’]) ? $posted[‘invoice’] : ”;
if(!empty($order_id)) {
$order = new WC_Order($order_id);
$order->update_status(‘completed‘); <<<<< Change status here?
}
}
add_action(‘paypal_ipn_for_wordpress_payment_status_completed’, ‘update_wc_order_status’, 10, 1);Best regards
Eric
Forum: Plugins
In reply to: [PayPal for WooCommerce] PayPal Plus: Lastschrift payment method not workingIt works great with Lastschrift here.
I had first the same issues but after PayPal Plus was activated a week ago, it seems all to work.