Appointments+, Marketpress, Custom Fields and Hooks

Greetings.
I'm looking to implement a particular function into my site where I would like users to be able to kind of "rent" part of a webpage for a day... The best way I can describe it is as this:

1. A user selects a marketpress appointment.
2. The user enters their "details" in a custom field.
3. The user pays through the cart.
4. When payment is accepted, appointment is approved.
5. When the appointment time rolls around, the page associated with the appointment changes to that user's "details".
6. Once the appointment is over, it rolls back.

Basically I think I would need a custom field on the product page that associates it with a custom field on the content page. And I would guess set up a wp cron so that when the time rolls around, the page content changes and then changes but once it's complete. Are you able to help?

  • Vinod Dalvi

    Hi Robbie,

    I hope you are well today and thank you for your question.

    1. A user selects a marketpress appointment.
    2. The user enters their "details" in a custom field.
    3. The user pays through the cart.
    4. When payment is accepted, appointment is approved.

    I think you can achieve this by integrating Appointments + & MarketPress plugins and creating Appointments + Additional fields.

    To integrate Appointments + & MarketPress plugins activate the "Appointments in product cart" Appointments + add-on from the following path.

    Admin Area -> Appointments -> Settings -> Add-ons

    Then Go to Appointments+ -> Settings -> General and then down to the Payment Settings. Set "Payment Required" to yes, and new options will appear. Configure everything to your liking, and make sure to have "Integrate with MarketPress" checked. Save.

    Now all of your Appointments will be processed through the MarketPress plugin.

    You can create and use Appointments + Additional fields by enabling the "Additional fields" Appointments add-on and configuring it from the following path.

    Admin Area -> Appointments -> Settings -> General -> Display Settings

    5. When the appointment time rolls around, the page associated with the appointment changes to that user's "details".
    6. Once the appointment is over, it rolls back.

    You will have to develop custom code to achieve it.

    what are the hooks available to the Appointments+ plugin? Relevant to above, I'd like to utilize the hook that nominates the start and end time of an appointment.

    There are various hooks in the Appointments + plugin. The function post_confirmation is called when we save appointment which contain following hooks along with some other hooks.

    app_post_confirmation_duration
    app_new_appointment

    You can use the above hooks to hook custom functionality when saving the appointment.

    You will find more information about these hooks in the function post_confirmation on line number 1487 in the following Appointments file.

    appointments/appointments.php

    You will find more information about the usage of this plugin on the following page.

    https://premium.wpmudev.org/project/appointments-plus/#usage

    Best Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.