Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Kim L

    (@kimmyx)

    Hi @momo360modena,

    Thanks for the heads up! We’ll let our development team know so they can correct the information.

    Have a great day!

    Plugin Author Daniel Iser

    (@danieliser)

    @momo360modena – Appreciate the report & your patience. Just patched this so it shouldn’t throw errors.

    Will look to push an update this week for it.

    In the mean time modify classes/Admin/Notices.php:261

    Replace with

    $env = function_exists( 'wp_get_environment_type' ) ? wp_get_environment_type() : 'production';
    Thread Starter Amaury Balmer

    (@momo360modena)

    Or add a function like this to your plugin

    if ( !function_exists('wp_get_environment_type') ) : 
    
    function wp_get_environment_type() {
    	static $current_env = '';
    
    	if ( ! defined( 'WP_RUN_CORE_TESTS' ) && $current_env ) {
    		return $current_env;
    	}
    
    	$wp_environments = array(
    		'local',
    		'development',
    		'staging',
    		'production',
    	);
    
    	// Add a note about the deprecated WP_ENVIRONMENT_TYPES constant.
    	if ( defined( 'WP_ENVIRONMENT_TYPES' ) && function_exists( '_deprecated_argument' ) ) {
    		if ( function_exists( '__' ) ) {
    			/* translators: %s: WP_ENVIRONMENT_TYPES */
    			$message = sprintf( __( 'The %s constant is no longer supported.' ), 'WP_ENVIRONMENT_TYPES' );
    		} else {
    			$message = sprintf( 'The %s constant is no longer supported.', 'WP_ENVIRONMENT_TYPES' );
    		}
    
    		_deprecated_argument(
    			'define()',
    			'5.5.1',
    			$message
    		);
    	}
    
    	// Check if the environment variable has been set, if getenv is available on the system.
    	if ( function_exists( 'getenv' ) ) {
    		$has_env = getenv( 'WP_ENVIRONMENT_TYPE' );
    		if ( false !== $has_env ) {
    			$current_env = $has_env;
    		}
    	}
    
    	// Fetch the environment from a constant, this overrides the global system variable.
    	if ( defined( 'WP_ENVIRONMENT_TYPE' ) && WP_ENVIRONMENT_TYPE ) {
    		$current_env = WP_ENVIRONMENT_TYPE;
    	}
    
    	// Make sure the environment is an allowed one, and not accidentally set to an invalid value.
    	if ( ! in_array( $current_env, $wp_environments, true ) ) {
    		$current_env = 'production';
    	}
    
    	return $current_env;
    }
    
    endif;
    Plugin Support Kim L

    (@kimmyx)

    Hi @momo360modena,

    Thank you so much for the suggestion.

    The plugin has been patched to sort out the version issue.

    Please try it out and let us know if you still see errors. ??

    Have a great day!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Popup Maker – WordPress version requirements’ is closed to new replies.