\n \n <\/td>\n | <?php<\/td>\n <\/tr>\n |
\n <\/td>\n | \n<\/td>\n <\/tr>\n |
\n <\/td>\n | class My_Integration_Class extends Hustle_Provider_Abstract {<\/td>\n <\/tr>\n |
\n <\/td>\n | \n<\/td>\n <\/tr>\n |
\n <\/td>\n | public static function check_is_compatible( \$class_name ) {<\/td>\n <\/tr>\n |
\n <\/td>\n | \n<\/td>\n <\/tr>\n |
\n <\/td>\n | // This validation is done by the original method. Including it here as an example.<\/td>\n <\/tr>\n |
\n <\/td>\n | \$is_php_version_supported = version_compare( PHP_VERSION, self::\$_min_php_version, '>=' );<\/td>\n <\/tr>\n |
\n <\/td>\n | if ( ! \$is_php_version_supported ) {<\/td>\n <\/tr>\n |
\n <\/td>\n | return false;<\/td>\n <\/tr>\n |
\n <\/td>\n | }<\/td>\n <\/tr>\n |
\n <\/td>\n | \n<\/td>\n <\/tr>\n |
\n <\/td>\n | // Doing some custom validation.<\/td>\n <\/tr>\n |
\n <\/td>\n | if ( ! self::will_this_integration_work_properly() || ! ( class_exists( ‘My_Required_Class’ ) ) ) {<\/td>\n <\/tr>\n |
\n <\/td>\n | return false;<\/td>\n <\/tr>\n |
\n <\/td>\n | }<\/td>\n <\/tr>\n |
\n <\/td>\n | <\/td>\n <\/tr>\n |
\n <\/td>\n | return true;<\/td>\n <\/tr>\n |
\n <\/td>\n | }<\/td>\n <\/tr>\n |
\n <\/td>\n | <\/td>\n <\/tr>\n |
\n <\/td>\n | private static function will_this_integration_work_properly() {<\/td>\n <\/tr>\n |
\n <\/td>\n | // Do some custom validation. Maybe check for existing plugins or conditons. <\/td>\n <\/tr>\n |
\n <\/td>\n | return true;<\/td>\n <\/tr>\n |
\n <\/td>\n | }<\/td>\n <\/tr>\n |
\n <\/td>\n | }<\/td>\n <\/tr>\n <\/table>\n<\/div>\n\n\n <\/div>\n\n <\/div>\n<\/div>\n\n <\/div>\n |