We have added WP All Import so we can monitor the sign up progress of users but there is an issue with the registration flow.
there are currently 3 steps to signing up:
1 - user registers
2 - users completes vendor form
3 - user creates a listing
We changed the setting to ‘allow direct registration’ and you can see vendors showing on the back end however this does not seem to be firing a hook for WP All Import to export the user.
We have spoken to WP All Import about this and they have checked the full site and have asked the following:
"The automatic creation of the “vendor” post type is not firing the hooks that WP All Export uses to detect new posts.
If you can contact the developers that wrote the code that automatically creates them (looks like it might be HivePress) and ask them which hook fires when the Vendors are programmatically created (the hook must be fired after all of the Vendor information is saved), then we can provide more advice on how the example code would have to be changed.
We are also unsure as to why there are two entirely different flows for vendor registration when it is direct or ‘listing based’ - surely they can both use the same flows?
I don’t see any benefits in separating it, it just causes more issues - the ideal scenario would be that vendors register via the same URL (flow) but become visible on the site at either listing stage or vendor registration stage depending on Administrators settings - not which URL they have clicked?
Sorry for the delay. We use the core wp_insert_post function for creating vendor profiles so all the WordPress hooks should be fired during the profile creation. Please ask WP All Import for more details, which hooks are required and what’s the purpose - if I understand correctly you want to import vendor profiles?
The direct vendor registration is an extra way to register vendors if vendors on your site are not required to add at least 1 listing (this is the default flow, users become vendors only after submitting their first listing, they get a vendor profile if it’s approved).
if I understand correctly you want to import vendor profiles?
No - we are trying to export the vendor profile to mailchimp (via WP All import and Zapier) when it is completed (using direct vendor registration flow). We have isolated the issue to the expected hook not firing when a user completes the vendor form when ‘direct registration’ is switched on.
this is the default flow, users become vendors only after submitting their first listing, they get a vendor profile if it’s approved
That’s not how the site is operating. When users register by creating a service, their vendor profile will only show if they list a service. When users register by ‘register vendors’ their vendor profile shows after completing the vendor form. The problem with this logic is that if a user registers by ‘creating a service’ their vendor information does not show in the back end even if ‘direct registration’ is allowed - it seems to be an entirely different flow.
BTW - point 1 is the most pressing for us, the second point is just an observation that we are working around.
Thanks for the screencast, I understand the issue clearly but vendor profiles are created using the same core WordPress function and it should fire all the WordPress hooks for a new entry of the post type. Please ask WP All Import support which hook triggers these actions for Zapier, or maybe their specific function or hook can be fired - then I’ll provide a code snippet to run the code when the vendor is created or published.
Thanks Ihor, here is their response (please note we use the term ‘creator’ for ‘vendor’:
When I manually create a new “Creator” post, import ID 16 is automatically running to export that record. That said, it looks like it’s still firing before all of the creator information is available, which would have to be solved as explained below:
The automatic creation of the “creator” post type is not firing the hooks that WP All Export uses to detect new posts, so a custom integration has to be written.
If you can contact the developers that wrote the code that automatically creates them (looks like it might be HivePress) and ask them which hook fires when the creators are programmatically created (the hook must be fired after all of the creator information is saved), then we can provide more advice on how the example code would have to be changed.
If it helps, we did not have this issue when we had switched off ‘direct registration’, only when we switched it on.
This is where the vendor profile is updated when the Complete Profile form is submitted hivepress/v2/models/user/update So if you want to export all the details added via the attribute fields then WP All Import should trigger export on “hp_vendor” update with some condition if some meta fields are set (this way you can check if the form was filled).
Yes, at that time there are no extra profile details filled (those based on attributes),
Well, this is critical, is there code we can insert to include the extra profile details?
Sorry for the delay. I assume that there’s no way to resolve this if WP All Import has custom conditions for checking if one of the meta fields is set (this way it’s possible to check if one of the required attributes is saved, then other attributes are saved too), because if it triggers import/export on the “hp_vendor” post type creation, at the time of creation via the front-end (when the vendor draft is created in the beginning of the registration process) there are no attribute values yet.
I’m sorry for the inconvenience, but it’s impossible to guarantee integration with all the WordPress plugins. In this case the issue is on the WP All Import side, we’re following the WP coding standards and 100% using their core functions. The issue is that WP All Import triggers it’s features on the post creation and it doesn’t have a feature to trigger features on the post meta update, if WP All Import had this option you would enable it on their side and the sync would work as expected.
In any case, I hope you’ll find a better solution for your project. We’ll also consider integrating WP All Import with all the HivePress features, maybe even enabling features that they don’t have via their API.
This is not a bug since it doesn’t break any of the HivePress functionality. An empty vendor profile is created at the beginning of the vendor registration process, and then it’s filled during the following registration steps - nothing too complex here.
I understand that you need a specific feature (triggering WP All Import monitoring on profile creation) and you’re frustrated that it’s not possible to enable it without integration/customizations, but this is a missing feature on WP All Import side - they have a trigger for the custom post type creation, but not custom post meta update. If they had this trigger, monitoring would work as expected.
Thanks for your feedback, we’ll consider full WP All Import integration, but we will not re-build the framework just to match third-party plugin’s set of features, there are tens of thousands of plugins for WordPress and they have different frameworks/APIs.