Posted: December 30, 2013 at 4:55 am
|
Hi, we are only accepting payments through bank transfer for our event. Thus payment status has to be changed manually. On the Thank You page I we want to display different messages and options depending on the payment status. I noticed that the variable $payment_status === “Pending” when it should not. Here are the values I get, based on the payment status setting in the admin panel: Completed –> Completed (Correct) It seems to me that payment declined and cancelled should yield different values. WP 3.8 |
|
Hi Hannes, I’m not entirely sure what you are trying to achieve here, as in where you are getting the data from, but when I tested changing attendee status’ via the admin area, the database updates correctly http://d.pr/i/8GRn |
|
Thanks Dean, in payment_overview.php there is a switch statement: switch( $payment_status ). I am trying to query this $payment_status variable in order to show different messages (different HTML chunks) to the user. But as stated above, the variable equals “Pending” when the actual status is declined or cancelled. |
|
It appears to be working when I test it: |
|
The print_r($payment_status) came before the switch statement already. Checking the database I found that while the wp admin interface shows a declined payment correctly, the database doesn’t get updated correctly and still shows “pending”. |
|
Are you doing this on a primary attendee or an additional attendee? |
|
On a primary attendee. |
|
It should be running the database update in includes/admin-reports/enter_attendee_payments.php on line 114. You are not getting the error message from line 117? |
|
I just tested it in the admin on your site, and it’s working correctly. I’m looking at attendee #197, changed payment status to ‘Payment Declined’ and hit ‘update payment’ button. Reloaded the attendee in the DB, and payment status changed to ‘Payment Declined’. Changed payment status in the admin back to ‘Incomplete’, hit ‘update payment’ button, reloaded the attendee in the DB, and payment status was changed back to ‘Incomplete’. |
|
Sorry, my bad. When testing, I reloaded the thank you page which is shown after registration. I didn’t realize that the form got resubmitted each time, resetting the payment status. |
The support post ‘Manual payment status change always yields "Pending"’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.