Maintaining Plugin Updates with a custom plugin

Our site has the v1.2.3 of the plugin installed. The reason it is out-of-date is because the developer helping on the site has been customizing the plugin to be able to handle unique things of our business. We would like to be able to maintain updates as they happen from WPMU while also maintaining custom changes. While it appears there is no way to make a child plugin like in themes, what do you recommend is the best way to handle these situations? Our developer is very hesitant in doing the update to 1.2.8, as am I, but we would like the new features that the updates bring as they include some things we were going to develop custom for our site anyway.

I appreciate the help.

Thanks,
Jon

  • PC

    Hello Jon,

    Custom modifications in the plugin will be over written with the plugin updates.

    If your developer wants to update the plugin to the latest version and do not want the changes to be wiped off, he will have to look at the code of new plugin and adapt the developed plugin with that code by making necessary changes (copy/paste etc)

    Unfortunately there is no simple way to do that.

    He can use a compare tool to compare both the plugin files.

    I hope that helps. Please feel free to ask if you have more questions on the same.

    Cheers
    PC

  • mr_jonboy

    Thanks for the reply, PC. Yeah, that is what I was afraid of and had heard from others as well. The developer noted that along with code differences with new functionalities there could also be changes in database fields and/or older fields could be depricated in newer versions. Would this be the case for us going from 1.2.3 to 1.2.8? It would be nice to know if they just need to make code copy and pastes (cause I could help them with going through the code) or if they would need to do more than that.

    Thank you again,
    Jon

  • PC

    Hey Jon,

    Thanks for writing back and sorry for the delay as I was away for a couple of days.

    There have been quite a few changes in the plugin code since Version 1.2.3

    New: Users page custom column to display GCal method of service providers at a glance
    - Enhancement: More safety measures
    - Enhancement: ADDRESS and CITY placeholders can be used in GCal location field
    - Change: If there is a connection error with Google server for GCal, error message is logged now instead of throwing an exception
    - Change: GCal button can now be disabled from either settings or from the my_appointments shortcode
    - Change: Now accepting 20 minutes of token time difference while it was 30 seconds before
    - Fix: Description template for GCal for service providers' own settings was not being used, but website template was being used
    - Fix: Updating of GCal event when appointment belongs to a specific service provider and edited on the admin side
    - Fix: Overwriting of Event Summary of Note field during GCal update

    DATE: 2013-04-11 • VERSION: 1.2.7
    - New shortcode app_all_appointments to list all upcoming appointments
    - Fixed CANCEL link in reminder message and related "Catchable fatal error" message
    - Confirmation shortcode lacking warning message is now limited to pages those actually having schedule shortcodes
    - New filters for emails
    - Tested with WordPress V3.6 Beta 1, no incompatibilities found
    DATE: 2013-03-31 • VERSION: 1.2.6
    - Client can be allowed to cancel his appointments using links in confirmation or reminder emails, my appointments table or using his profile page
    - Schedules can be forced to start from a selected date using shortcode parameter "date"
    - CITY placeholder can be used in emails
    - A minor improvement of how ID's recorded to the log file
    - Fixed a minor markup issue in monthly calendar when last day of the month is also last day of the week
    - GCal exception errors are saved in log file if they are not possible to be displayed because headers were sent
    - Session start errors after GCal submission are handled more gracefully
    - New FAQ's added
    DATE: 2013-03-26 • VERSION: 1.2.5.1
    - Fixed calendar widget not correctly showing completely booked days
    - Notification message to service provider includes appointment date and time now
    DATE: 2013-03-15 • VERSION: 1.2.5
    - New dismissable admin notice if confirmation shortcode is lacking on an appointment page
    - In MarketPress integration, product button for appointments in product list page is changed as Choose Option
    - Fixed a javascript issue when paypal shortcode is not used, although payment required is set as Yes
    - Improvements in user profile settings for GCal API
    - Prevented deleting of a service provider's imported GCal events when removing those of another one
    - Improvements for translation of pagination texts
    - Filters for reducing time base smaller than 10 minutes and appointment upper limit are now effective
    - Selectable service durations are increased to 24 items, but limited to 24 hours
    DATE: 2013-03-10 • VERSION: 1.2.4.1
    - Bulk status changes are applied to GCal
    - For logged in users, email and user display names are pre populated in the confirmation form
    - Fix for special characters (like &:wink: in email headers
    - Fix for more conflicts with Google+ plugin
    DATE: 2013-03-04 • VERSION: 1.2.4
    - Prevented auto increment value in appointments table going too high after GCal imports
    - Fix for BuddyPress working hours being reset issue when provider confirms his appointments using his navigation tab
    - GCal API setting fields are no more shown in profile page of a non service provider member
    - Private key files for service providers are correctly duplicated to uploads folder now
    - Prevented conflict with Google+ plugin and other possible plugins using Google API by renaming $apiConfig variable
    - Some UI improvements to display selected currency and clarify GCal usage. Also new FAQ's added
    - During uninstall, all traces of GCal are removed from file system and database
    - Fixed default settings not being loaded for new installations
    DATE: 2013-02-26 • VERSION: 1.2.3.3
    - Fix for Export button not working on some areas
    - Permission to use cents in price fields which was accidentally disabled in the previous update
    - Fixed issues when GCal API test connection and manual imports are started from user profile page
    DATE: 2013-02-24 • VERSION: 1.2.3.2
    - Empty spaces used in reminder times are deleted now
    - New filter to define special prices for MarketPress integration
    - Updated jquery datepick and fixed conflict with WooCommerce
    - Fix for special characters in emails
    - Reserved appointments (related to events imported from GCal) are no more editable as they are supposed to be
    - Wrong non-numerical value settings in capacity, service and service provider prices are not allowed any more

    I will suggest you to get in touch with your developer and have him test it on a lab site on how to proceed further.

    Cheers, PC

  • mr_jonboy

    Thanks PC. Is there anyway to get the appointments.php file sent over for newest release so they can compare it with what we have now after our customization without actually updating it in WP? I just know if we make the update it will override everything we have built and I would like them to have all the changes figured out and ready to apply to the updated plugin as soon as we update it.

    Also, per my comment above about my developer being worried about changes in database fields and/or older fields could be depricated in newer versions. Will that apply at all here or will it just be changes in the appointments.php file?

    Also, not sure if you guys care or if this was even in your development plan but we customized the plugin to handle recurring appointments as our kind of business deals with them a lot. I had ask WPMU in the very beginning and they mentioned it could be something down the road. Anyway, we have done it if it is something that interests you.

    Thank you for the help,
    Jon

  • PC

    Hey Jon,

    Thanks for posting back.

    Thanks PC. Is there anyway to get the appointments.php file sent over for newest release so they can compare it with what we have now after our customization without actually updating it in WP? I just know if we make the update it will override everything we have built and I would like them to have all the changes figured out and ready to apply to the updated plugin as soon as we update it.

    You can download all the files here : https://premium.wpmudev.org/download/209139141_appointments-1.2.8.zip

    unzip them and send them to your developer for review.

    Also, per my comment above about my developer being worried about changes in database fields and/or older fields could be depricated in newer versions. Will that apply at all here or will it just be changes in the appointments.php file?

    I will get our lead developer @Vladislav on this question. I have already sent him a note.

    Also, not sure if you guys care or if this was even in your development plan but we customized the plugin to handle recurring appointments as our kind of business deals with them a lot. I had ask WPMU in the very beginning and they mentioned it could be something down the road. Anyway, we have done it if it is something that interests you.

    Selling multiple appointments is now possible using MarketPress integration which is now available with the plugin. So anyone can buy multiple appointments and also use MarketPress' gateways.

    Cheers, PC

  • Vladislav

    Hello,

    As far as I can tell, the database schema didn't change between the v1.2.3 and the current plugin version - some of the data handling functionality did change, though, so it would be best to have a round of thorough testing in some sort of staging environment to make sure everything went fine after repatching the updated version.

    I understand the dilemma and challenges you're facing with the upgrade of a customised plugin, as that is always hard. In my experience, it is usually best to customise the behavior of a plugin by another plugin - meaning, making use of the WordPress hooks API and actions/filters exposed by the plugin to alter the behavior in the way you want. This is a bit less intuitive way of making changes then just going in and altering the file, but it usually pays off when it's upgrade time (although, a round of testing in a staging environment is, in my opinion, a really, really nice, good and smart thing to do, always). Another good idea might be storing custom changeset-specific data in another data source (e.g. in an options, usermeta or postmeta table, with a changeset-specific key). This way you're less reliant on the original plugin data schema. Of course, these are just some broad points that I personally found worth the effort in the long run, your specific case might be very different and your developer would be the best judge.

    Having said that, perhaps the scope of the changes you have made just doesn't fit with the current set of actions/filters exposed by the plugin. If this is the case I'd be happy to expose more hooks in the critical places, as indicated by you or your developer.

  • mr_jonboy

    Thank you guys for the help on this and I have passed this info to my developer.

    We do have another question somewhat similar to this issue. We are trying to improve the performance of the site so that we can launch it to the public (its running incredibly slow). Now while we can improve it with better site hosting we are also finding that there are site issues that need troubleshooted and corrected. Now the site is slow all around (home page is taking about 8-9 sec to load), however, when the pages with the Appt. plugin are called the site is slower still. We don't necessarily believe the issue is the Appt plugin but maybe there are conflicts with it and other plugins installed. We still need to do the most recent plugin update (maybe there is new optimization since v1.2.3) but are there any plugins that you guys know conflict with the Appt plugin and may cause site slowing issues?

    Thank you for the help.

    Jon

  • Vladislav

    Hello,

    I'm not presently aware of a conflict that would directly contribute to the plugin slowness. One thing to be aware, though, is that each additional bit of code contributes to your site loading speed and the sluggishness is cumulative. The plugin out of the box will try its best not to bog down your site and will make use of features such as object caching if you have it in place. One of the features you'd perhaps want to make use of (if you don't already) is to try and turn on the built-in caching, once you set up the appearances and shortcodes the way you want them (Settings > Advanced Settings > Use Built-in Cache).

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.