• Resolved alexfreeskier

    (@alexfreeskier)


    Hello,

    I would like to buy the pro version, but when I tested the free version I am not able to choose user roles for frontend campaign creator.

    WordPress answeres: Warning: Invalid argument supplied for foreach() in /homepages/2/d647578598/htdocs/clickandbuilds/localRockets/wp-content/plugins/wp-crowdfunding/admin/includes-tab/tab-general.php on line 18

    I already took a look at the code and the error must occur in this section when counting the user-roles and adding them to a key:

    $campaign_creator    = array();
    $roles  = maybe_unserialize(get_option( 'wp_user_roles' ));
    if (count($roles)){
        foreach( $roles as $key=>$role ){
            $campaign_creator[] = $key;
        }
    }

    I have WooCommerce-Plugin installed and I am using WP Jobmanager-Plugin and Ultimate Members Plugin (with WP Jobmanager Connective Plugin).

    Therefore I got as well the wp_user_roles and two general user roles (admin & member)

    a. If you have no experience with this error, maybe you can provide a code-snippet to manually allow different user roles to create frontend campagnes?

    b. If this is not possible, is there a code-snippet to allow “all logged-in users” to create frontend campagnes?

Viewing 1 replies (of 1 total)
  • Thread Starter alexfreeskier

    (@alexfreeskier)

    I found a c.-way to kinda “fix it” using https://de.www.ads-software.com/plugins/user-role-editor/ to bypass the selecting-field in your plugin.
    Maybe you should think about leaving it out if it causes too much error and refer to your colleagues plugin?

    It took me 5 hours today to come across with this semi-“solving” ..now I test the translating and then maybe go for enterprise-version..

    BUT please – still try to fix this issue as my solution is not the smart way..
    afterwards I will check this topic as solved and if you can also solve my Mandrill-issue I will give you a five-star-rating OF COURSE ??

    Have a nice day.

Viewing 1 replies (of 1 total)
  • The topic ‘Can’t select any Campaign creator’ is closed to new replies.