Okay
  Public Ticket #3754838
WP User Sync
Closed

Comments

  • Tom started the conversation

    Hi,

    Is there a way of deactivating the recent update that syncs the WP User with the Amelia Customer information?

    I can see how useful it would be for most however our use case is different and the first name of the Amelia Customer shouldn't match the first name of the WP User. All other details are fine but those two I can't have syncing and I'm having to go into the database each time we modify a user to then change their name back to what we need it to be.

    Thanks very much.

  •  1,596
    Marko replied

    Hello there,

    Thank you for reaching out to us.

    No, but you can change the name of the WP user in WP users section. Only user name can not be changed so you do not need to change this in the database.

    Should you have any further inquiries, we kindly request that you open separate tickets for each question and we will gladly help you there.

    We wish you all the best and hope you have a wonderful day ahead.  

    Kind Regards, 

    Marko Davidovic [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Tom replied

    Hi Marko,

    Thanks for the reply. Updating the WP User also updates the Amelia Customer so that doesn't seem to work?

    For clarity:

    1. A Customer record is updated in Amelia
    2. This then draws the WP User first name in to the Amelia database
    3. So, I then change the Customer first name in Amelia back to the name it should be (in our case a Pet's name)
    4. This then updates the WP User first name to the Pet's name when WP User should be the Owner's name
    5. So, I go into the WP User section and update the User first name back to the Owner's name
    6. This then updates the Amelia database back to the Owner's name rather than the Pet's name

    And so the cycle goes on.

    Is there a function, action, or trigger of some kind I can tap into via additional PHP code to break this cycle?

    I completely get the modification when a Customer's name is the same as the WP User's name, but our use case doesn't reflect this and it's becoming really problematic. I'm happy to create a custom PHP snippet that interacts with the Amelia process if you can provide guidance as to what to target?

  •  1,596
    Marko replied

    Hello again,

    Unfortunately, currently this feature is not available in Amelia. What you want is specific need and this is not possible to achieve at this time Im afraid. 

    In light of this, we encourage you to kindly consider submitting this valuable suggestion as a feature request through the following link: https://features.wpamelia.com/. The prioritization of feature development is greatly influenced by the number of customer requests received. By participating and expressing your support, you contribute significantly to the potential expedited implementation of this feature. Not sure if this will be implemented to be honest since probably 99% percent of users like the way this works and I can not remember that we had a such request before.

    Should you have any further inquiries, we kindly request that you open separate tickets for each question and we will gladly help you there.

    We wish you all the best and hope you have a wonderful day ahead. 

    Kind Regards, 

    Marko Davidovic [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Tom replied

    I'm updating this as a public reply because there is/was a solution to this using a combination of WP hook and the Amelia Developers Documentation:

    Turn Off Customer to WP User Sync

    • Using the Webhook "amelia_before_customer_updated" run a SELECT query for the wp_usermeta table to get the meta key values required based upon the externalId parameter shared by the filter. Then store it as a custom meta value for the User to be used later. This is all run before the Customer updates in the database.
    • Then, using the Webhook "amelia_after_customer_updated" set the user meta using the stored data essentially overwriting the data that has been changed by the Amelia customer sync process.

    Turn Off WP User to Customer Sync

    • Add a PHP code snippet with the following: 
      remove_action('profile_update', ['AmeliaBooking\Infrastructure\WP\UserService\UserService', 'updateAmeliaUser'], 10, 3);

    ---

    The WP User <-> Amelia Customer sync addition is absolutely essential for most use cases but the above provides a reverse engineering solution should it be required. A good understanding of the Amelia database structure is fairly useful, as is the ability to write custom PHP snippets.

  •  1,596
    Marko replied

    Hello again,

    Thank you for sharing this with us and with other users hopefully this will help if there are some other users with same requirements.

    Should you have any further inquiries, we kindly request that you open separate tickets for each question and we will gladly help you there.

    We wish you all the best and hope you have a wonderful day ahead. 

    Kind Regards, 

    Marko Davidovic [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables