ActiveCampaign / postmark-wordpress

The Official Postmark Wordpress Plugin
GNU General Public License v2.0
17 stars 17 forks source link

POSTMARK_DIR is undefined when upgrading plugin via CLI #58

Closed pgraham3 closed 4 years ago

pgraham3 commented 4 years ago

https://wordpress.org/support/topic/upgrade_completed-method-uses-undefined-postmark_dir-constant/

If you upgrade any other plugin via the CLI (wp plugin upgrade), you get a warning from Postmark that POSTMARK_DIR is undefined, as it’s called via a filter, and isn’t initialized.

Can this be addressed?

Warning: Use of undefined constant POSTMARK_DIR – assumed ‘POSTMARK_DIR’ (this will throw an Error in a future version of PHP) in /app/wp-content/plugins/postmark-approved-wordpress-plugin/postmark.php on line 450

pgraham3 commented 4 years ago

@broksonic21 Just release v1.12.5 - please let me know if you see the undefined POSTMARK_DIR warning the next time you upgrade other plugins via the CLI. I switched to using plugin_basename to get the Postmark plugin when doing the comparison to the upgraded plugins, instead of using the constant + filename concatenated string.

broksonic21 commented 4 years ago

This worked fine - Thanks!