Warning message on Woocommerce My Account page when WP-members plugin enabled (2 posts)

  1. malmy
    Posted 2 years ago #

    When I have the WP-members plugin enabled and none of the fields checked to be visible when registering from the My Account page of my Woocommerce store, I get the following warning message:

    Warning: Invalid argument supplied for foreach() in /home3/medquest/public_html/wp/wp-content/plugins/wp-members/native-registration.php on line 131

    You can see it on the page here: https://nutrascriptives.com/my-account/

    The warning message goes away if I disable the WP-members plugin or make one of the user fields visible like First Name, Last Name, etc.

    Any ideas on how I can keep this plugin enabled and have the registration page look as it does, but without showing this warning message?

  2. Denis Rakhmanov
    Posted 2 years ago #

    Confirm same problem, it can be solved by adding an if condition.

    And replacing the statement on line 131 in to condition :

    if (($rows = apply_filters( 'wpmem_native_form_rows', $rows ))){
    foreach( $rows as $row_item ) {
    if( $row_item['type'] == 'checkbox' ) {
    echo $row_item['row_before'] . $row_item['field'] . $row_item['label'] . $row_item['row_after'];
    } else {
    echo $row_item['row_before'] . $row_item['label'] . $row_item['field'] . $row_item['row_after'];

Topic Closed

This topic has been closed to new replies.

About this Topic