Support » Plugin: Paid Memberships Pro - Content Restriction, User Registration, & Paid Subscriptions » Error on 2Checkout payment redirect: Uncaught ArgumentCountError

  • Resolved Surenderk

    (@surenderk)


    I have been using Paid memberships pro for quite a while now and it has been working great. But after updating it to latest version, I am getting following error after payment is submitted using 2Checkout payment gateway:

    PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function pmpro_after_checkout_update_consent(), 1 passed in /home/mydomain.com/wp-includes/class-wp-hook.php on line 286 and exactly 2 expected in /home/mydomain.com/wp-content/plugins/paid-memberships-pro/includes/privacy.php:483
    
    [26-Dec-2018 04:37:26 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function pmpro_after_checkout_update_consent(), 1 passed in /home/mydomain.com/wp-includes/class-wp-hook.php on line 286 and exactly 2 expected in /home/mydomain.com/wp-content/plugins/paid-memberships-pro/includes/privacy.php:483
    Stack trace:
    #0 /home/mydomain.com/wp-includes/class-wp-hook.php(286): pmpro_after_checkout_update_consent('4810')
    #1 /home/mydomain.com/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #2 /home/mydomain.com/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #3 /home/mydomain.com/wp-content/plugins/paid-memberships-pro/services/twocheckout-ins.php(354): do_action('pmpro_after_che...', '4810')
    #4 /home/mydomain.com/wp-content/plugins/paid-memberships-pro/services/twocheckout-ins.php(62): pmpro_insChangeMembershipLevel('250099241612', Object(MemberOrder))
    #5 /home/mydomain.com/wp-content/plugins/pai in /home/mydomain.com/wp-content/plugins/paid-memberships-pro/includes/privacy.php on line 483
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi there,

    Thank you for using Paid Memberships Pro, I’m sorry for the issue you are facing.

    What version of Paid Memberships Pro are you using?

    Please could you temporarily set a Terms of Service page under Advanced Settings inside Paid Memberships Pro and see if that helps with the issue.

    This issue doesn’t seem to be related to 2Checkout but more regarding the Terms of Service settings.

    Thread Starter Surenderk

    (@surenderk)

    Hello Andrew,

    I already checked by setting up a TOS page with Paid Memberships Pro version 2.0.1 but no luck. Getting following error:

    [07-Jan-2019 11:10:22 UTC] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function pmpro_after_checkout_update_consent(), 1 passed in /home/mydomain.com/wp-includes/class-wp-hook.php on line 286 and exactly 2 expected in /home/mydomain.com/wp-content/plugins/paid-memberships-pro/includes/privacy.php:483
    Stack trace:
    #0 /home/mydomain.com/wp-includes/class-wp-hook.php(286): pmpro_after_checkout_update_consent('4810')
    #1 /home/mydomain.com/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #2 /home/mydomain.com/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #3 /home/mydomain.com/wp-content/plugins/paid-memberships-pro/services/twocheckout-ins.php(354): do_action('pmpro_after_che...', '4810')
    #4 /home/mydomain.com/wp-content/plugins/paid-memberships-pro/services/twocheckout-ins.php(62): pmpro_insChangeMembershipLevel('9093747746310', Object(MemberOrder))
    #5 /home/mydomain.com in /home/mydomain.com/wp-content/plugins/paid-memberships-pro/includes/privacy.php on line 483

    One thing that I want to point out is that this error occurs after I submit payment using hosted 2checkout page. After the payment is processed, I am supposed to return back to website on membership confirmation page. Instead I can only see a blank page and in WordPress debug.log, I can only see the above error.

    To get around this issue, I downgraded the plugin to version 1.9.3 which is way too old. So, I was hoping to get it fixed so that I can update it to latest version.

    Plugin Author Andrew Lima

    (@andrewza)

    Thanks for the feedback, we will be looking into this further.

    I’m really sorry for the inconvenience caused by this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error on 2Checkout payment redirect: Uncaught ArgumentCountError’ is closed to new replies.