Monthly Archives: September 2015

HostelPRO Developers API

From version 1.7 the WordPress plugin HostelPRO supports basic API to help deveopers extend its functionality. The API currently provides mostly hooks fired when some data in the system is added or changed – i.e. booking is made, room is added, field is deleted etc.

If you need a specific hook or filter to be added please contact  us at hi@wp-hostel.com and it may be added to the next version.

Available API Hooks in Models:

These hooks are do_action calls fired when item is added, modified or deleted. They should be caught by add_action calls.

Main plugin file:

do_action(‘hostelpro_admin_menu’);   – called after all menu links. Lets you plug your custom menu links under the HostelPRO menu.

do_action(‘hostelpro_init’); – called when the plugin initialization is completed.

Rooms:

do_action(‘hostelpro_room_added’, $id); – when room is added. Passes the room ID.

do_action(‘hostelpro_room_edited’, $id, $vars); – when room is edited. Passes the room ID and the full array of new data (typically coming from $_POST).

do_action(‘hostelpro_room_deleted’, $id); – when room is deleted. Passes the field ID.

Bookings:

do_action(‘hostelpro_booking_paid’, $id); – when booking is paid (either from admin or verified Paypal / Stripe payment)

do_action(‘hostelpro_booking_added’, $id); – when booking is added. Passes the booking ID.

do_action(‘hostelpro_booking_edited’, $id, $vars); – when field is edited. Passes the booking ID and the full array of new data (typically coming from $_POST).

do_action(‘hostelpro_booking_deleted’, $id); – when bookin g is deleted. Passes the booking ID.

do_action(‘hostelpro_booking_cancelled’, $id); – when booking is cancelled.

do_action(‘hostelpro_booking_data_saved’, $id, $vars);– when the custom data about booking is saved (the data from the custom fields).

Addon Services:

do_action(‘hostelpro_addon_added’, $id); – when addon service is added. Passes the addon ID.

do_action(‘hostelpro_addon_edited’, $id, $vars); – when addon service is edited. Passes the addon ID and the full array of new data (typically coming from $_POST).

Discounts / Surcharges:

do_action(‘hostelpro_discount_added’, $id); – when discount / surcharge is added. Passes the discount / surcharge ID.

do_action(‘hostelpro_discount_edited’, $id, $vars); – when discount / surcharge is edited. Passes the discount / surcharge ID and the full array of new data (typically coming from $_POST).

do_action(‘hostelpro_discount_deleted’, $id); – when discount / surcharge is deleted. Passes the discount / surcharge ID.

Booking Form Fields:

do_action(‘hostelpro_field_added’, $id); – when field is added. Passes the field ID.

do_action(‘hostelpro_field_edited’, $id, $vars); – when field is edited. Passes the field ID and the full array of new data (typically coming from $_POST).

do_action(‘hostelpro_field_deleted’, $id); – when field is deleted. Passes the field ID.

Available API Hooks in the Views

In addition  to the above actions each of the admin pages for editing an item also let you add your own form elements on it so you can process custom data with the form:

do_action (‘hostelpro_booking_form’, @$booking) is on the Add / Edit Booking form. Passes the $booking object in case of editing.

do_action (‘hostelpro_room _form’, @$room) is on the Add / Edit Room  form. Passes the $room object in case of editing.

do_action (‘hostelpro_field_form’, @$field) is on the Add / Edit Field form. Passes the $field object in case of editing.

do_action (‘hostelpro_discount_form’, @$discount) is on the Add / Edit Discount / Surcharge form. Passes the $discount object in case of editing.

do_action (‘hostelpro_addon_form’, @$addon) is on the Add / Edit Addon  form. Passes the $addon object in case of editing.

Paid Mailing Lists in Arigato PRO Intelligence

From version 1.0.9 the Intelligence module for Arigato PRO drip marketing suite supports mailing lists with paid signup. The feature requires that the core Arigato PRO is also updated to version 2.5.3 or newer.

The currently supported payment method is Paypal (more options to come).

To make a paid mailing list first ensure that you choose currency and enter your Paypal ID in your Arigato PRO Settings page.

Then in the Add / Edit Mailing list form you simply need to enter a price:

list-fee

When this is done, the user will be charged to activate their subscription:

  • If the mailing list does not require double optin confirmation the user will be charged right after registration and activated right after payment.
  • If the list does require email confirmation the user will be asked to pay when they click on the “confirm email” link and their account will be activated after payment.

Any redirections set up for the list will be satisfied. It’s recommended to setup redirection for lists that don’t require email confirmation so the user is not returned to the same page with the signup form, wondering if they have to signup again.

If you want to use the feature with lists integrated via contact forms or lists included in forms with multiple-list checkbox selection, then make sure these paid mailing lists require email confirmation.

Don’t forget that you can also handle paid mailing lists using the WooCommerce bridge.

PurpleSalad Restaurant Menu Plugin

We have released a new free WordPress plugin – PurpleSalad (see also its site and blog). It’s a plugin for restaurant menus.

Why another plugin of this kind? PurpleSalad is different and better than most other plugins for several reasons:

  • Very easy to start. No long configurations or study, just go to the menu and start working on your menu.
  • Import / export from / to CSV file.
  • Very flexible layouts system. Layouts can be modified right inside the WP editor and you can have as many of them as you wish.
  • Comes with predefined layouts so you can start right away.
  • Localization-ready.

And not last, it comes from company with several already popular WordPress plugins so you can expect it to be good 🙂