Okay
  Public Ticket #3198012
Programmatically Setting The Appointment Status from Pending to Approved
Closed

Comments

  • Phil started the conversation

    I am looking at the integration with woocommerce and specifically where a customer may book a fitting slot as part of an order.

    I want to be able to have them select "Fitting" as an option on a variable product. Before checking out to have them create a pending appointment by selecting an available slot using the booking form. I will capture the appointment id / details and store as meta data with the order.

    Then when they complete the checkout I want to use the order created event to set the corresponding appointment to approved.

    I didn't want to be going in and manually approving so was looking at using the API with an automation tool to be fired from woocommerce order created event, to use the stored meta data and update the status to approved. 

    Is there an API that is available for use in this automation task?



  •  1,564
    Marko replied

    Hello Phil,

    Thank you for your interest in our product.

    We will explain how the logic between Amelia bookings and WooCommerce Products works:

    -

    Once you enable WooCommerce as a payment method,  in Amelia settings/Payment settings,

    a new Woo Product is automatically created , named "Appointment".

    9387954985.png

    You will be able to see it in back-end of WordPress in WooCommerce/Products:

    3177928457.png

    By default, all services/events are connected to this WooCommerce product,

    you are able to edit it/rename it, etc.

    You are also able to add multiple products and choose which product is connected to which Service/Event.

    In Amelia, go to the Services page, edit one of the services and you will see Settings/Payments tab.

    Here you will see the option “Select WooCommerce product” where you can choose a product that will be connected to this service. 

    2128350322.png

    The same applies to Events

    This way, you will be able to set different taxes and other WooCommerce options for each product and each service/event in Amelia.

    After setting the product, you can set the Tax and/or invoice option, or if you don’t need either of these options, you can start using the WooCommerce payment methods

    1. We have recently updated our Documentation page that explains how you can connect the statuses between Amelia and WooCommerce;

    2. You can also add taxes, and invoices if you wish, with WooCommerce as well;

    3. In the “Redirect page” option you can choose to which page customers will be redirected to after they finish their booking successfully. If you select the “WooCommerce Thank you page”, your users will stay on the last page of WooCommerce, and if you chose the “Amelia Add to Calendar page”, your customers will be redirected to the Congratulations page in Amelia, with the option to add their appointment or event to their calendar. -

    All of this is explained on this page - https://wpamelia.com/woocommerce-integration/

    If you can please check it out, and let me know if anything was not clear and if you have further questions. Thank you smile.png

    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

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

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia 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