Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Just to add to this we are also having issue with it crashing our site when we go to woocommerce settings.

    One of our other AWS plugins it seems is using a newer version of the aws sdk which is installed via composer.

    “require”: {
    “php”: “>=7.0”,
    “composer/installers”: “~1.0”,
    “aws/aws-sdk-php”: “3.*”
    }

    This is conflicting with your version and giving a php fatal error.

    We are trying to find a work around but had no luck yet.

    You plugin fix zip above worked does this version just have an updated version of the php sdk?

    Thanks

    Thread Starter yasminwalsh

    (@yasminwalsh)

    function api_check_access(){
    
    	wp_send_json(array(
            'status' => true,
            'message' => __('', 'language'),
            'data' => wp_get_current_user()
        ));
    
    }
    
    add_action( 'rest_api_init', function () {
    
    	add_filter( 'jwt_auth_whitelist', function ( $endpoints ) {
    		return array(
    			'/wp-json/jwt-auth/v1/access/*'
    		);
    	});
    
    	register_rest_route('/jwt-auth/v1', 'access', array(
    		'methods' => 'POST',
    		'callback' => 'api_check_access',
    		'permission_callback' => function($request){	  
    		  	return is_user_logged_in();
    		}
    	)); 
    
    });
Viewing 2 replies - 1 through 2 (of 2 total)