mailgun / wordpress-plugin

Mailgun's Wordpress Plugin
GNU General Public License v2.0
48 stars 53 forks source link

Put $mailgun in global scope for later use #141

Closed fiskhandlarn closed 2 years ago

fiskhandlarn commented 2 years ago

Without it, includes/options-page.php will choke on line 53 with error Call to a member function getAssetsPath() on null.

oleksandr-mykhailenko commented 2 years ago

We wanted to get rid of global and right now you can use next code to get instance of class in whatever place you want

$mailgun = Mailgun::getInstance();

This code in the master branch already and can be used

fiskhandlarn commented 2 years ago

@oleksandr-mykhailenko but current version on wordpress.org breaks the option page in wp-admin due to the above mentioned error (caused by the above mentioned usage of global $mailgun). you should probably push a new release asap. :)

fiskhandlarn commented 2 years ago

@oleksandr-mykhailenko nm, i see that you did that two hours ago.

oleksandr-mykhailenko commented 2 years ago

@fiskhandlarn does it work for you right now ? Because I do not see any errors

fiskhandlarn commented 2 years ago

@oleksandr-mykhailenko it didn't work on 1.8.4 (i got the error described above). gonna try with 1.8.5 tomorrow.

fiskhandlarn commented 2 years ago

@oleksandr-mykhailenko /wp-admin/options-general.php?page=mailgun works for me on 1.8.5.