• Hello,

    We are using your plugin on our website. We found that there is issue in part of integration with Google Calendar. We use Gmail API as well over WP Gmail SMTP plugin to send emails, also we used before alternative plugin, but both of them using Google API library as well yours Appointments+, so when both extension are activated Appointments+ unable to add events to Google Calendar. From our log files it gives fatal error.

    After long debug process I found that it cause due to usage of Google API Library which are two different version. Appointments+ use old one v1.1.5 when other plugins are using 2.2.1, so some functions was replicated or changed, it gives fatal error. The thing is that WP Gmail SMTP loaded first and it loads Google API (Google_Client, Google_Service .. files) and as it’s already loaded Appointments+ calling objects with non exists or wrong arguments stack.

    As a result of this issue Appointments+ unable to send events to Google Calendar and we don’t see them in Calendar.

    How can we resolve this issue?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter wildanimal

    (@wildanimal)

    Exact name of the plugin name which we use to integrate with Gmail API is WP Mail SMTP. https://www.ads-software.com/plugins/wp-mail-smtp

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hey @wildanimal,

    Hope you’re well.

    I installed the plugin you mentioned and Appointments on my test site. Configured WP Mail SMTP plugin to Gmail, then activate Appointments Google Calendar integration. But looks like I can’t replicate the problem because when I try to create new Appointment it adds to my calendar too.

    I want to ask are you getting the email from SMTP plugin? Maybe that plugin causes some problems while sending an email and that’s why Appointments can’t go to next step. Also, can you write here to exact log file errors?

    And the last question, did you try only with SMTP plugin and Appointments plugin by deactivating all others?

    Cheers,
    Oguz

    Thread Starter wildanimal

    (@wildanimal)

    Hello Oguz,

    It depends in which sequence WordPress loads both modules. If WP Mail SMTP loaded first – you will get fatal error in log file when your frontend user will click Confirm and Submit Appointment (it send ajax request to proceed appointment which gives 500 server error).

    I spent time yesterday to debug it and found that it happening just because WP Gmail SMTP has own version of Google API Library (v2.2.1) and it is not full library there, it contain only files related to Gmail API. As Google_Client is essential part for Google API Library and both extension has own version of it when Appointments+ plugin trying to work with Google_Client loaded by WP Mail SMTP plugin it crashes, as some of functions was deprecated in Google API v2.2.1 comparing to v1.1.5 which uses by Appointments+.

    You can see that in beginning of /wp-content/plugins/appointments/includes/external/google/Client.php file, there is condition:

    if (!class_exists(‘Google_Client’)) {
    require_once dirname(__FILE__) . ‘/autoload.php’;
    }

    which does not allow to load own version of Google API Library v1.1.5, because WP Mail SMTP loaded it before, so it is already exists and as a result Appointments trying to operate with wrong version of Google API Library (v.2.2.1).

    Exact error happening in class Appointments_Google_Calendar_API_Manager:
    $this->client->setLogger( new Appointments_Google_Calendar_Logger( $this->client ) );

    It inherited Google_Logger_Abstract where in __construct function it calling:
    $client->getClassConfig(‘Google_Logger_Abstract’, ‘level’)

    But Google_Client v2.2.1 does not have getClassConfig function anymore. It has getClassConfig in v1.1.5 but not in v2.2.1

    I hope I gave as much as possible details to describe case in details. And yes, it have been working 1 week and then by no reasons it fail again – it happened 3 times in a row (during 3 weeks), so we just didn’t understood what cause the issue until yesterday when I spent full day to find this problem.

    Also I found on WP Mail SMTP support forum that people mentioned same issue with Appointments plugin.

    Thread Starter wildanimal

    (@wildanimal)

    And it is not only issue with WP Mail SMTP, we used few mail modules before it, which based on Google API Library — there is same exact issue with them as well.

    • This reply was modified 6 years, 5 months ago by wildanimal.
    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hey @wildanimal,

    Hope you’re well.

    Thank you for your detailed information about the problem. I forward this to our developers for detailed investigation. And you can be sure added all information you provided to the report. Once I got more information about this from developers I will update this thread.

    Cheers,
    Oguz

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Not working correctly with Gmail SMTP plugins’ is closed to new replies.