PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Paypal Add-on / Populating custom post type taxonomies

  1. My site has 2 gravity forms, each of which create a custom post type entry. The forms are essentially the same, except one allows free registration and the other drives registrants via Paypal (we are using the GF Paypal add-on) before the post type entry is created. The forms contain multiple taxonomies, which are set up in the form, and populated via this code... Gist Code.

    When the free form is used, the taxonomies are populated correctly when the custom post type entry is added. However, when we go via Paypal all the other custom post type entries are populated except the custom taxonomies.

    I have a feeling that between Paypal and the website these are being dropped somewhere. Do you have any ideas where?

    Many thanks.

    Posted 11 years ago on Thursday February 28, 2013 | Permalink
  2. I'll forward this to the development team for their input.

    Posted 11 years ago on Saturday March 2, 2013 | Permalink
  3. This is too complex of a customization for us to try and figure out what is wrong (in a support forum topic) or what needs to be changed. However, we can give your some pointers as to how go about troubleshooting this.

    The first thing I would do is add a free test product to the PayPal form and submit it with that free product. That will bypass PayPal and you will then be able to see if the taxonomy problem is related to PayPal or not. Let us know your results.

    Posted 11 years ago on Tuesday March 5, 2013 | Permalink
  4. Hi.
    Thanks for this.
    I have just edited the form to set the price to zero, and have unchecked the 'Create post only when payment is received.' setting in the GF Paypal Add-on. The post gets created ok and the taxonomies get populated ok, so I guess it looks like Paypal and the GF Paypal Add-on aren't working properly together?
    I appreciate any help you can provide here.

    Posted 11 years ago on Wednesday March 6, 2013 | Permalink
  5. I just saw something that caught my attention in your code. You are using the deprecated gform_post_submission hook. That hook has some inconsistencies, especially when dealing with the PayPal redirect.
    Try changing it to gform_after_submission and let me know how it goes.

    Posted 11 years ago on Wednesday March 6, 2013 | Permalink
  6. Hi Alex.
    I've just changed the hook name to gform_after_submission in my functions.php but still get the same result - i.e. the taxonomy values don't get included when the custom post type is added.
    My complete functions.php file now looks like this (just in case something else in there is breaking this).

    Posted 11 years ago on Wednesday March 6, 2013 | Permalink
  7. Hi again. Would it be possible to get a WordPress administrator login and FTP login information from you. We'd like to take a closer look and try to help you out. Please send those details via email to chris@rocketgenius.com - thanks for sticking with it.

    Posted 11 years ago on Wednesday March 6, 2013 | Permalink
  8. Hi Chris.
    Just sent you an email with the info you requested. Email subject is 'Re: Paypal Add-on / Populating custom post type taxonomies'.
    Thanks in advance for your help.

    Posted 11 years ago on Thursday March 7, 2013 | Permalink
  9. I forwarded that on to the Development team. Thank you.

    Posted 11 years ago on Sunday March 10, 2013 | Permalink
  10. Hi Martin. I heard back again from the development team.

    I think we figured out what is going on. One of the developers made an addition to your code to use the gform_paypal_fulfillment hook as well. That hook will add the taxonomies when the payment is made. We were not sure exactly what to look for, so we didn't go through a full test. Please give it a try and see if it works as expected and let us know.

    Posted 11 years ago on Wednesday March 13, 2013 | Permalink
  11. Thanks. We have had one new post created today. I'm just getting the website owner to confirm that the taxonomy fields were automatically populated or whether she added them manually afterwards. If they happended automatically then the fix is a good one. I'll let you know as soon as she replies to me.

    Posted 11 years ago on Thursday March 14, 2013 | Permalink
  12. I've had some feedback from the website owner. She has had one new registration since you changed the functions.php file. It appears that the taxonomy fields still aren't being populated. In addition, although the new registrant had his custom post type created (without populated taxonomies) his actual user record doesn't appear to have been created and he didn't receive a welcome email.
    I'm pretty sure that this bit was ok yesterday. Is it possible that something in the new function code has caused the process to break before completion?

    Posted 11 years ago on Thursday March 14, 2013 | Permalink
  13. Yea, it doesn't look like I will be able to help you. I try to go above and beyond helping customers (even on customizations), but your code is a bit too complex for me to fully understand and I am apparently overlooking things when suggesting fixes. I am sorry I wasn't able to help you this time.
    If you would like me to change the code back to how you had it, I will be glad to.

    Posted 11 years ago on Monday March 18, 2013 | Permalink
  14. Thanks for looking Alex, I appreciate your help. Yes please, would you put the code back as it was before?

    I'm disappointed that this code doesn't work with taxonomies out of the box, though. I don't think we're doing anything unusual here.

    I'll push this code change out to tender. Is there anything you would bring to the attention of our proposed developer that might expedite things?

    Thanks again. Please would you let me know when the code has been put back?

    Posted 11 years ago on Tuesday March 19, 2013 | Permalink
  15. I'll have Alex change the code back and we'll let you know when the change has been made.

    Posted 11 years ago on Saturday March 23, 2013 | Permalink
  16. Martin, can you please confirm the FTP details you sent me? Alex was having trouble using them again, and I know you had fixed them once before. Can you confirm that they still work? Thank you.

    Posted 11 years ago on Tuesday March 26, 2013 | Permalink
  17. Hi there, I was having a similar problem. I wanted users to be able to upload a file, paying a set price for that, then after they pay, a post is created and the file is attached to the post. If I uncheck the box that says "Create post only when payment is received." it works great, but I uncheck that, not so great. The post is created, and the media file is uploaded, but the user does not get redirected to the new post (like they do when the box is unchecked) and the media file does not get attached to the post. So... I think the problem is that gform_after_submission is firing before the payment is made and not after.

    Using gform_paypal_fulfillment instead did the trick, however, the user is no longer being redirected to the newly created post. Any ideas?

    Here is the form: http://fantagul.us

    Posted 11 years ago on Friday April 12, 2013 | Permalink
  18. y360, please open a new topic for your issue so we can address it properly there. Thank you. Please be suire to include a link to your form, and post all your custom code to pastebin.com or pastie.org.

    Posted 11 years ago on Sunday April 14, 2013 | Permalink

This topic has been resolved and has been closed to new replies.