• Hi, I foolishly upgraded to Version 3 of Woo on Friday, whilst updating some other Woo plugins… its broken a few things on my site. The main one being the Customer Payment Page. The way I operate with many of my customers is that I put custom orders together in the back end of Woo and then send the customer the payment page link. If I now click on ‘Customer Payment Page’ it takes me to a page on my site with the following error:

    INVALID ORDER. IF YOU HAVE AN ACCOUNT PLEASE LOG IN AND TRY AGAIN.

      MY ACCOUNT

Viewing 15 replies - 16 through 30 (of 33 total)
  • Thread Starter wsystems

    (@wsystems)

    As a workaround, Ive fortunately got my developer to create a hack for this issue and I would urge anyone else to do the same, he has updated the core Woo File so that it hides this error and works as it did previously, until Woo hopefully create an update to resolve this, which will just overwrite his hack as and when its updated….

    All my clients have been contacting me over the last couple days informing me of the ‘error message’ as well. Glad I did some research, as I would have never guessed it was due to an update (as I’ve updated without this issue several times).

    I custom create invoices for several of my clients and email it over for them to pay. This makes it easier on both ends as they are international clients, and some do not speak English very well (so explaining things can be a challenge). I need them to be able to click the link and go directly to a payment page, without added steps.

    Additionally, from my understanding the message should request them to log in and not say ‘invalid’ or ‘error’. This makes them think something went wrong with the site or their end, especially when they have not had issues in the past.

    Is there a way you could share the hack wsystems? I would like to see a quick fix to the core files, but who knows when that will actually happen.

    So either hack the core file or roll-back to 2.6?
    If the Woo team are treating this like it’s a security feature, I’m not sure if this is going to change.

    @mikejolley, I know you casually mentioned it once, but for the folks on this thread who are struggling with a fix, can you please make a definitive statement about this?
    Maybe there’s a plug-in?

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    It is indeed security related as we need to ensure customers details are not visible – thats why it needs login.

    > Additionally, from my understanding the message should request them to log in and not say ‘invalid’ or ‘error’. This makes them think something went wrong with the site or their end, especially when they have not had issues in the past.

    This is a good suggestion and one I’ve logged: https://github.com/woocommerce/woocommerce/issues/14385

    The code which prevents access looks like this:

    
    if ( ! current_user_can( 'pay_for_order', $order_id ) ) {
    				echo '<div class="woocommerce-error">' . __( 'Invalid order. If you have an account please log in and try again.', 'woocommerce' ) . ' <a href="' . wc_get_page_permalink( 'myaccount' ) . '" class="wc-forward">' . __( 'My account', 'woocommerce' ) . '</a>' . '</div>';
    				return;
    }
    

    Just to note, you don’t need to hack core to get around this. WordPress has a filter called user_has_cap which can be used to give anyone this capability. Just use it responsibly.

    https://codex.www.ads-software.com/Plugin_API/Filter_Reference/user_has_cap

    The other use case I’m reading here is about taking payment over the phone and paying as a user. This is the case that is definitely not supported. You need to remember; when you checkout it updates user meta, stores data to the current account, even stores credit card tokens if you’re using a gateway like Stripe. This should not be assigned to your account.

    Someone linked to a thread from a year ago about this where I suggested user a ‘user switching’ plugin if this was needed. That still stands, but the best way IMO would be to use your Payment gateways virtual terminal (if it has one) to take the actual payment and keep things secure. You can create an order still, just take the payment off-site.

    Thanks Mike. I guess that’s that. User switching only works if you have ALL your customer’s passswords… Kinda useless.

    I upgraded to the latest Woo again.
    Just processed an order with the virtual terminal.
    This is a brand new PITA!

    There is a mysterious plug in called “phone Orders” that claims to allow seller inputted CC.
    But it looks too shady to try (even though it has 200 downloads).
    If anyone has good advice about this, please post it.
    Thanks!

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    user switching does not require passwords; that would make the plugin pointless. Where does it prompt?

    Thanks Mike…
    Ha! I wasn’t using it correctly.
    All I saw was the “switch out” option in the upper right account corner – which does prompt for a PW.

    Now I see the “Switch to” links in the user list beside user names.
    I’ll try that maneuver out and report back to this thread.

    I second what wsystems is indicating about the message that customers receive who are not logged in. “Invalid order. If you have an account please log in and try again.” This made me think something was wrong with the checkout page, until I found this thread. Shouldn’t it indicate that the customer needs to be logged in to their account to pay? This message seems to indicate a technical issue.

    I’m following this as I hope it is resolved in time (to at least use a more user friendly string;

    in the mean time I have used this so the customer does not get confused:

    function lh_sites_specific_text_strings( $translated_text, $text, $domain ) {

    switch ( $translated_text ) {
    case ‘Invalid order. If you have an account please log in and try again.’ :
    $translated_text = __( ‘Please login to complete the order’, ‘woocommerce’ );
    break;
    }

    return $translated_text;
    }
    add_filter( ‘gettext’, ‘lh_sites_specific_text_strings’, 20, 3 );

    • This reply was modified 7 years, 7 months ago by shawfactor.

    I’m also interested in knowing a solution about this. I have a client that uses this functionality in their website, and now it is broken after the update.

    Is there even a plugin that makes this works like before (2.6) ?

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    No plugin, but there is an issue logged https://github.com/woocommerce/woocommerce/issues/14385

    If someone wants to contribute to that before we get around to it, be my guest.

    Hi @mikejolley

    Thanks for replying. I see the issue open.

    Thanks.

    I have same problem. Prior to WC 3.x , it used to work.

    Now Shop Owner can’t pay on behalf of customer’s. The “Customer Payment Page” link
    is useless!!!

    Besides changing the translated error text, is there any work-around or plugin
    that gets around this problem?

    THANKS

    • This reply was modified 7 years, 6 months ago by hiheaven01.

    The only wordaround I’m aware of is to use the User Switching plugin. It means adding yet another plugin, and you have to create the user account first, then add the order, switch to the user, and pay the invoice, but it’s better than having to go out to your payment gateway to make the payment, I guess.

    If you don’t associate the order with a user account you can still use the system like you did pre 3.0.

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘‘Customer Payment Page’ Link Not working/Error’ is closed to new replies.