• Resolved barathibalamurugan

    (@barathibalamurugan)


    Fatal error</b>: Uncaught Error: Call to undefined function convert_to_screen() in
    /opt/lampp/htdocs/wordpress/wp-admin/includes/class-wp-list-table.php:148
    Stack trace:
    #0 /opt/lampp/htdocs/wordpress/wp-content/plugins/simple-membership/classes/class.swpm-membership-levels.php(12):
    WP_List_Table->__construct(Array)

    This error occurs using __construct function in SwpmMembershipLevels class.

    I found the solution as well. Please get back me, i will share the same.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for reaching out to us and reporting this error. I have submitted a message to the developers to investigate further your findings.

    Kind regards.

    Plugin Author wp.insider

    (@wpinsider-1)

    Hi, You can reply here and provide the info.

    Please note that we don’t see this error on our site or any other sites using this plugin at the moment. So there is something specific to your site’s setup that is creating the error. I would like to know what that special condition is (that’s creating the conflict).

    Thread Starter barathibalamurugan

    (@barathibalamurugan)

    $swpmmembershiplvls = new SwpmMembershipLevels();
    $valid_for = $swpmmembershiplvls->column_default($request, ‘valid_for’);

    I have used this in my code. And it throws the above error. Because the function convert_to_screen() is not accessible from class.swpm-membership-levels.php

    require_once( ABSPATH . ‘wp-admin/includes/template.php’ );

    Import this in the class.swpm-membership-levels.php. Will solve this issue i hope. Please check and update the build.

    Thank you,
    Bala

    Plugin Author mra13

    (@mra13)

    Hi, The following line of code is not present anywhere in the plugin’s code:

    
    $valid_for = $swpmmembershiplvls->column_default($request, ‘valid_for’);
    

    Are you saying that you added custom code in the plugin for some kind of customization?

    Thread Starter barathibalamurugan

    (@barathibalamurugan)

    Hi,

    Please ignore this.
    $valid_for = $swpmmembershiplvls->column_default($request, ‘valid_for’);

    $swpmmembershiplvls = new SwpmMembershipLevels();

    This above code is causing this issue. Simply i’m trying to create a object using “SimpleMembershipLevels->__construct” function which internally calls WP_List_Table->__construct function where this issue is occurred.

    Thread Starter barathibalamurugan

    (@barathibalamurugan)

    Any update on this?

    Plugin Author wp.insider

    (@wpinsider-1)

    Hi, We unfortunately cannot make a change to the core plugin’s code based on code customization you are making. That can impact many thousands of other sites where the plugin is working fine. What you are trying to do is not an advertised feature of our plugin.

    You can suggest action hook or filter hook to be added to the plugin and we can do something about that.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fatal error: Uncaught Error: Call to undefined function convert_to_screen()’ is closed to new replies.