Scheduler › Forums › BirchPress Scheduler › Making changes to BrichPress files
Tagged: modification to original files
This topic contains 18 replies, has 2 voices, and was last updated by support 10 years, 7 months ago.
-
AuthorPosts
-
September 27, 2013 at 5:38 am #3397
I want to implement an integration between BirchPress Scheduler Pro and Woocommerece but I don’t want to modify original files.
Is there a way to copy the necessary files to the child theme and make the modifications there?
Thank you.September 27, 2013 at 6:33 pm #3405Hi Sharon,
There is no need to copy files. You can use hooks to add your features.
September 27, 2013 at 10:53 pm #3409should there be a list of available hooks?
we need to know how to hook to your plugin.
thank you.September 28, 2013 at 6:42 pm #3416Hi Sharon,
We are refactoring our code. The new architecture will generate sufficient hooks for customization. We will write a document on how to find the hooks.
Currently there is no document listing all hooks. For your case, you can hook to filter ‘birchschedule_validate_booking_form_info’ to check if the credit of the customer is enough to book an appointment.
The example code for this hook is located at ‘birchschedule/classes/logic/birs-calendar-logic.php’. Please refer to it.September 29, 2013 at 12:52 am #3419thank you but this hook is not enough. I need to show woocommerce products on the confirmation page.
which hook should I use for this?
will these hooks change once you finish the reconstruction of the plugin?September 29, 2013 at 6:23 am #3421The hook is filter ‘birchschedule_ajax_booking_response’.
The example code for this hook is located at ‘birchschedule/addons/form-builder/birs-addon-form-builder’. Please refer to it.
We will keep this hook available in the new version.
September 29, 2013 at 7:04 am #3423not sure where ‘birchschedule/addons/form-builder/birs-addon-form-builder’ is located. is it a URL? I cannot find it in your website.
what about the PHP code section available under Scheduler–>Settings–>Custom Code in the admin panel?
Is this where I can add my changes?
thank you.September 30, 2013 at 7:43 am #3429‘birchschedule/addons/form-builder/birs-addon-form-builder.php’ is the path of the source code. You can find it at wp-contenct/plugins/birchschedule/addons/form-builder/birs-addon-form-builder.php.
For your case, it is better to write a separate plugin to fulfill this feature rather than pasting the code under ‘Scheduler>Settings>Custom code.’
October 1, 2013 at 12:56 am #3435Does separate plugin means we need to copy the entire BirchPress plugin OR it should be a plugin that uses your hooks to add functionality?
also, if you have the required hooks then why do we need to develop a different plugin rather than use them in child theme function.php?
thank you.October 1, 2013 at 3:34 am #3436Using hooks in child theme function.php is also a good option.
October 1, 2013 at 3:52 am #3437that’s great but we’ll need a list of available hooks in order to utilize this ability and avoid modification to original files.
can you arrange such a list for us?
thank you.October 1, 2013 at 6:07 pm #3453We are not able to give you a document listing all hooks within a few days. If you need any hooks during your development, you can ask us and we will tell you if there is one available.
October 3, 2013 at 1:01 am #3473do you have something for registering an appointment as paid?
thank you.October 3, 2013 at 6:36 pm #3502You can set ‘post_status’ of the appointment with ‘publish’ and ‘_birs_appointment_payment_status’ with ‘paid’.
October 4, 2013 at 3:41 am #3503so to summarize what I need to integrate with woocommerce they way I need:
- To check if the credit of the customer is enough to book an appointment hook to filter ‘birchschedule_validate_booking_form_info’ (example code for this hook is located at ‘birchschedule/classes/logic/birs-calendar-logic.php’).
- To show woocommerce products on the confirmation page hook to filter ‘birchschedule_ajax_booking_response’. (example code for this hook is located at ‘birchschedule/addons/form-builder/birs-addon-form-builder’).
- To confirm the appointment hook to ‘post_status’ of the appointment with ‘publish’.
- To update the payment status of the appointment hook to ‘_birs_appointment_payment_status’ with ‘paid’.
Does that sounds about right?
thank you. -
AuthorPosts
The forum ‘BirchPress Scheduler’ is closed to new topics and replies.