• Resolved amoras

    (@amoras)


    First of all, great plugin! We have been looking for a while for a plugin that fits our needs.
    We are a study-association for engineers and we think this plugin wil help our members with finding en sharing student-rooms.

    I have been testing your plugin and ran in to a problem by submitting a new property in the front end.
    It causes a fatal error with the Woocommerce Membership plugin that we also have.
    The error stats the following:
    Fatal error: Uncaught ArgumentCountError: Too few arguments to function WC_Memberships::{closure}()

    I have contacted Woocommerce already, they are trying to find the issue. But they asked for your idea’s as well.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author g5theme

    (@g5theme)

    Hi,
    You using Woocommerce Membership for user.
    I haven’t yet test with it, so can’t say anything. I’m not promise our plugin compatible with other plugin.
    I will transfer your request to our developer team, they will consider check it.
    Thanks

    Thread Starter amoras

    (@amoras)

    Hey,

    Thanks for the quick reply.

    The guys by Woocommerce sent me the following finding:

    To add a little extra context, the error mentioned in your stacktrace is being thrown by Memberships, though it is hooked into a standard WordPress action, so not something directly related to the Memberships functions. The action it is listening for is: ‘wp_insert_post’. According to the developer guide for WordPress, this should provide three arguments, but according to the stack trace, the Essential Real Estate plugin only provided one.

    I hope this may be helpful for the developer team.

    Thread Starter amoras

    (@amoras)

    The plugin file were they are referring to:

    /plugins/essential-real-estate/public/partials/property/class-ere-property.php(233): do_action(‘wp_insert_post’, ‘wp_insert_post’)

    Plugin Author g5theme

    (@g5theme)

    Can you tell me what i have to do now? Example: copy this code to file….etc to fix your problem.
    Or something like that.
    To be honest, i don’t know what have to do now.

    SkyVerge

    (@skyverge)

    Hey @g5theme!

    Hope you don’t mind me jumping in here, I’m from the SkyVerge support team and I have been working with @amoras on this issue.

    From the stack trace that we were sent, it looks like line 233 of the class-ere-property.php class is calling the wp_insert_post action:

    #3 /home/deb94557/domains/svamoras.nl/public_html/ghost/wp-content/plugins/essential-real-estate/public/partials/property/class-ere-property.php(233): do_action('wp_insert_post', 'wp_insert_post')

    Memberships is following the current WordPress developer guidelines, which state that there should be three arguments for this action.

    The wp_insert_post action should be called with three arguments: $post_ID, $post, and $update. In order to resolve this error, could you please make sure you are passing these three arguments when calling do_action ‘wp_insert_post‘?

    Cheers!

    Simon.

    Plugin Author g5theme

    (@g5theme)

    Hi @skyverge thanks for your guide.
    I checked and fixed it with latest version 1.9.9
    Please update and let me know.
    If any help, let me know.
    Hope you like my plugin.
    Thanks

    Thread Starter amoras

    (@amoras)

    Hey @g5theme and @skyverge team,

    Thanks a lot for the help. The proposed solution from @skyverge fixed the issue.
    Soon the plugin will be used on our official site. We think our the students are gonna love the nieuw feature made possible by the plugin from @g5theme.

    Thanks a lot!

    SkyVerge

    (@skyverge)

    Hey all,

    That’s great news! I’m glad it all worked out in the end. Thanks for getting this sorted so quickly.

    Cheers,

    Simon.

    Plugin Author g5theme

    (@g5theme)

    Thank you all.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Can’t submit property in front end’ is closed to new replies.