Support » Plugins and Hacks » PayJunction Gateway Module for WooCommerce » [Resolved] Issue With WordPress 2.1 and Up?

[Resolved] Issue With WordPress 2.1 and Up?

  • Hello,

    After upgrading from WooCommerce 2.0.20 to 2.1, I started getting this error on the Order Confirmation page:

    Sorry, your session has expired. Return to homepage<\/a><\/li>\n\t\t\t
    Country<\/strong> is a required field.<\/li>\n\t\t\t
    First Name<\/strong> is a required field.<\/li>\n\t\t\t
    Last Name<\/strong> is a required field.<\/li>\n\t\t\t
    Address<\/strong> is a required field.<\/li>\n\t\t\t
    Town \/ City<\/strong> is a required field.<\/li>\n\t\t\t
    State<\/strong> is a required field.<\/li>\n\t\t\t
    Zip<\/strong> is a required field.<\/li>\n\t\t\t
    Email Address<\/strong> is a required field.<\/li>\n\t<\/ul>”,”refresh”:”false”,”reload”:”false”}

    Are you working on making this plugin compatible with WooCommerce 2.1 and above?

    On a side note, the PayJunction Woocommerce plugin shows up twice on my plugins list, and if I try to delete one of the listings, the entire plugin is deleted. Are you aware of this? Please fix.



Viewing 15 replies - 1 through 15 (of 20 total)
  • This is EXACTLY the same error we are as well… except it’s not the paymentjunction plugin, but rather an authorize.net gateway plugin. The orders go through but throw that ugly error message!

    Plugin Author sbsake


    Is there a woocommerce bug in the update ?

    You make get a fresh copy of the plugin here


    There was some code change in woocommerce that affects the “thank you” page after you place an order. when can you review and make necessary changes this is affecting a lot of users.


    Yes, exactly. Is there any way to figure out what to change or any type of “regression/compatibility” setting or whatever that you can enable to have it continue to use the “thank you” slug or something we can hardcode somewhere?!? The orders do process… it DOES work….. the only thing that doesn’t is this crazy error once the order is placed……

    I believe it comes down to this set of code in the gateway-payjunction.php file


    // Return thank you page redirect
    return array(
    ‘result’ => ‘success’,
    ‘redirect’ => add_query_arg(‘key’, $order->order_key, add_query_arg(‘order’, $order_id, get_permalink(get_option(‘woocommerce_thanks_page_id’))))
    else :
    $cancelNote = __(‘PayJunction payment failed’, ‘woothemes’) . ‘ (Transaction ID: ‘ . $response->get_transaction_id() . ‘). ‘ . __(‘Payment was rejected due to an error’, ‘woothemes’) . ‘: “‘ . $response->get_error() . ‘”. ‘;

    $order->add_order_note( $cancelNote );

    $woocommerce->add_error(__(‘Payment error’, ‘woothemes’) . ‘: ‘ . $response->get_error() . ”);


    But i am unsure of how to fix to fit with the new woocommerce.

    The developers need to chime in on this one and get us an update. it is causing a riff in sales on my site.


    As others mentioned previously, I believe you will need to modify the PayJunction plugin to account for a couple “Refactor” changes in version 2.1 and above of Woocommerce:

    Refactor – Removed pay and thanks pages. Endpoints are used instead.
    Refactor – Removed certain my-account pages. Endpoints are used instead.

    See the Woocommerce Changelog here for more info:


    Please reply here when you have updated the plugin to account for this.

    Thank you!

    The issue is that not every payment gateway plugin is currently supported. The plugin that we use has been working flawlessly for over 2 years now. All of a sudden, BAM. Not working properly. And by not working properly, i mean that end checkout complete screen.

    There HAS to be a way that WooCommerce can be modified to not throw this ugly error….. Like I said, even if it’s a manual edit – it’s better than nothing. Would allow us time to find another plugin if necessary, test it and implement…. or simply continue to use the payment plugins without issue.

    Check my post below on how to fix the PayJunction Payment Gateway so that it uses the new WooCommerce 2.1 endpoints.

    I fixed it:

    Change this:

    // Return thank you page redirect
    				return array(
    					'result' 	=> 'success',
    					'redirect'	=> add_query_arg('key', $order->order_key, add_query_arg('order', $order_id, get_permalink(get_option('woocommerce_thanks_page_id'))))
    			else :

    To this:

    // Return thank you page redirect
    				return array(
    					'result' 	=> 'success',
    					'redirect'	=> add_query_arg('key', $order->order_key, add_query_arg('order', $order_id, $this->get_return_url($this->order)))
    			else :

    The payjunction team should have had this fixed a long time ago…

    It works! I knew it was that snippet but had no idea what needed to change. I blame both woocommerce and payjunction for the mess. I believe woocommerce should have warned users that this was a major upgrade and payjunction for not staying on top of what was going on with their plugin.

    Thanks again.


    If you guys don’t fix this on your end soon I’m going to have to give this plugin a poor review due to lack of support.

    Sorry but c’mon..

    Plugin Author sbsake


    Thanks for the response. This will be updated over the weekend due to more testing that is currently being done.

    Thank you sbsake, please reply here when the new version of the plugin is available.

    Plugin Author sbsake


    I have pushed the update and should be available shortly. This should resolve the issue that was encountered with WooCommerce update.

    Thanks for bringing this to our attention

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘[Resolved] Issue With WordPress 2.1 and Up?’ is closed to new replies.
Skip to toolbar