• Resolved Rostislav Wolny

    (@costasovo)


    I am a developer for the MailPoet WordPress plugin, and I wanted to bring an important update regarding the use of our internal code to your attention.

    We have noticed that your project is utilizing code within the \MailPoet\Models namespace. This code has been deprecated for some time and has been triggering warnings. It was not intended for external use. We have always provided a?public API.

    The problematic file is /Integrations/mailpoet/actions/update-subscriber-to-new-list.php

    $existing_subscriber = \MailPoet\Models\Subscriber::findOne( $subscriber['email'] );

    The code above will stop working. There is a method in the MailPoet’s public API that can be used as an alternative (https://github.com/mailpoet/mailpoet/blob/trunk/doc/api_methods/GetSubscriber.md). The plugin alreadu instantiate the API so you could just replace the code above with. The $exisiting_subscriber would be an associative array.

     $existing_subscriber = $mailpoet->getSubscriber( $subscriber['email'] );

    We aim to remove the \MailPoet\Models namespace in next couple of weeks. This change is necessary to maintain MailPoet’s integrity and performance.

    Thank you for your understanding and cooperation.

Viewing 1 replies (of 1 total)
  • Plugin Support Sure – David Kalu

    (@davek1)

    Hi @costasovo,

    Thank you for SureTriggers and for bringing this important update to our attention. We appreciate you taking the time to inform us about the deprecation of the \MailPoet\Models namespace code.

    We understand the importance of maintaining MailPoet’s integrity and performance and we will review the provided public API documentation (https://github.com/mailpoet/mailpoet/tree/trunk/doc) and apply the suggestions you’ve outlined to ensure compatibility with the upcoming changes.

    Regards

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.