Call to a member function trigger() on int

[ad_1]

Hi, We’re still having problems with our multisite running WordPress 6.6.1 & PHP 8.3.

Emailing doesn’t work and the offending lines seem to be lines 95, 96 here:

https://plugins.trac.projectdmc.org/browser/customer-address-change-notification-for-woocommerce/trunk/address-change-notification.php

95 $email = include(__DIR__.'/includes/email.php');
96 $email->trigger($customerId, $customer, $this->addressUpdatedCustomerIds[$customerId]);

Which result in a “Call to a member function trigger() on int” error. This error is eaten up silently by plugin, but I got it through debugging.

Changing the lines to this seemed to work on our case:

include(__DIR__.'/includes/email.php');
$email = new Email();
$email->trigger($customerId, $customer, $this->addressUpdatedCustomerIds[$customerId]);

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer