Skip to main content

Rentiva 6.0.7 — MHM Rentiva is now on the WordPress.org plugin directory

· 4 min read
MaxHandMade
Maintainer

MHM Rentiva is now published on the WordPress.org plugin directory. You install it the way you install anything else — search for it, click install — and WordPress keeps it updated from there on.

Installing has changed, and it is simpler

Until today the plugin reached you as a ZIP file you had to receive, upload and re-upload on every update. That is no longer the route:

  1. In your WordPress admin, go to Plugins > Add New.
  2. Search for MHM Rentiva.
  3. Click Install Now, then Activate.

The listing lives at wordpress.org/plugins/mhm-rentiva. From here on, updates arrive the same way every other directory plugin's updates arrive — WordPress checks on its own schedule and offers the new version on your Plugins screen. Nothing to download by hand.

Uploading a ZIP still works, and remains the way to install a specific build rather than the current release — for example a version from the GitHub releases page. The installation guide now describes all three routes.

WooCommerce is still required, and is checked when the plugin activates.

What is in 6.0.7

WordPress.org's review of the plugin found one issue, and 6.0.7 is its fix.

A batch customer-update method in the customer performance helper wrote WordPress user accounts behind the blanket edit_users capability — without asking whether the caller may edit that particular account, or whether the account was one this plugin manages. It had no caller anywhere, in this release or any earlier one, and there was no screen or address through which it could be reached.

It was removed rather than repaired, because unreachable code that writes user accounts should not ship at all. The two places that do edit an existing customer — the customer edit screen and the delete route — already asked that per-account question beside the write, and still do. Adding a customer is a different case: it creates the account, so there is no existing account for such a question to be about, and it is gated on the permission WordPress itself requires to create a user.

Coming from 5.x? Read this before you update

The last release written about here was 5.2.4. Between it and today sits 6.0.0, which was a major release with breaking changes — and they are the silent kind. If you have custom code that hooks into this plugin, it will simply stop running after the update: no error message, nothing in the log, the customisation just quietly stops happening.

113 hooks were renamed. To convert your own code, apply these two steps in the order given, because the order matters:

  1. In the older slash-style names, replace every / with _: mhm_rentiva/testimonials/limit becomes mhm_rentiva_testimonials_limit.
  2. Then replace the prefix mhm_rentiva_ with mhmrentiva_: that name finishes as mhmrentiva_testimonials_limit.

Doing step 2 first produces names that do not exist. Two hooks used a bare mhm_ prefix and follow the same idea: mhm_message_created and mhm_message_status_changed become mhmrentiva_message_created and mhmrentiva_message_status_changed.

The post types and taxonomies were renamed too, which changes the WordPress core hooks built from them — this is the part most easily missed, because these are not our hook names. save_post_vehicle is now save_post_mhmrentiva_vehicle, and the same applies to add_meta_boxes_* and to the manage_*_posts_columns / manage_*_posts_custom_column pairs. The renames are:

OldNew
vehiclemhmrentiva_vehicle
vehicle_bookingmhmrentiva_booking
vehicle_addonmhmrentiva_addon
mhm_app_logmhmrentiva_app_log
mhm_email_logmhmrentiva_email_log
mhm_contact_messagemhmrentiva_contact
vehicle_categorymhmrentiva_vehicle_category
addon_categorymhmrentiva_addon_category

The same rename affects any query you wrote by hand. A WP_Query with 'post_type' => 'vehicle', a pre_get_posts handler that checks for it, a get_posts call, a shortcode of your own — all of these now match nothing, silently, because they ask for a post type that no longer exists under that name.

What to search your custom code for before updating: mhm_rentiva, mhm_message_, save_post_vehicle, and the quoted literals 'vehicle', 'vehicle_booking', 'vehicle_addon' and 'vehicle_category'.

Your stored data is moved to the new names by a migration that runs once, automatically, the first time you load the admin after updating. Nothing is deleted and nothing needs to be re-entered. If you also run the paid add-on, update both at the same time: this version refuses to migrate underneath an older add-on rather than leave your data half-moved.