WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Woocommerce plugin. All works great, but I need add to PayPal IPN 'custom' field only 1 word instead "order_id" that writes at 'custom' field now.

I trying edit this file: ...woocommerce/classes/gateways/paypal/class-wc-gateway-paypal.php here you can see code

here screenshot of code that maybe needs to change

Need to change script that send "order_id" to PayPal on script that send my word to PayPal. That's all.

I believe it's easy to do. Please help. Appreciate any answers. Thanks.!

share|improve this question
    
Big thanks! That's exactly what I need :) – Tuffguy Apr 16 '13 at 10:45

You almost gave the answer yourself :o)

replace

'custom' => serialize( array( $order_id, $order->order_key ) ),

with

'custom' => 'yourword',

and you're done!

share|improve this answer
    
Mr. Ewout, please help me again. I need to do the same thing - to add a "custom" parameter to all payments from my website. Only difference is now I use Wordpress 4.5.3 and I can't find even the word "custom" there. here the screenshot, where it probably should be: i.piccy.info/i9/759c50ab52808a6dc4d89684e40e8e30/1467032457/… Am I right? Help me please – Tuffguy Jun 27 at 13:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.