Global Objects and Public Methods
This is not common practice, but it works. A better approach, is to use a class and with the singleton pattern, just like WooCommerce and many others, where you have: A static function (called instance, getInstance…) that: Creates an instance (object) if not already done and returns it Or returns the existing instance Let’s continue … Read more