• Resolved tomaston

    (@tomaston)


    Hi,

    I’m using WP 4.0 and WooCommerce 2.2.8. I have installed and activated this plugin, but it does not appear to work. On the Abandoned Orders, Email Templates and Recovered Orders tabs, I see the following error:

    Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /Users/tom.aston/Sites/therockspush/public/wp-content/plugins/woocommerce-abandoned-cart/woocommerce-ac.php on line 612

    Is there a fix for this? Is there an updated version of the plugin on it’s way?

    Many thanks

    https://www.ads-software.com/plugins/woocommerce-abandoned-cart/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter tomaston

    (@tomaston)

    I’m afraid I can’t give you access – the site is local only at the moment.

    I have just performed a new installation of WordPress 4.0 and added and activated WooCommerce 2.2.8 and WooCommerce Abandon Cart Lite Plugin 1.1. No other plugins activated; no products added; nothing else. I still receive the error

    Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /Users/tom.aston/Sites/cleanwp/public/wp-content/plugins/woocommerce-abandoned-cart/woocommerce-ac.php on line 612

    Any ideas? Has anyone else had this issue?

    Hi,

    We are unable to replicate the issue on our server, but we tried to apply fix for you from the warning you have mentioned in your post.

    Can you please give us your email address so we can send you the zip file which contains the fix for the issue mentioned by you? Fix is untested as we could not replicate issue on our server.

    Thanks,
    Bhavik Kiri

    Thread Starter tomaston

    (@tomaston)

    Hi,

    I have emailed you at [email protected]

    Many thanks,
    Tom

    peter

    (@dewebbouwmeester)

    Hello all,
    I get the same error ( mysql_num_rows() expects parameter 1 to be resource at line 612) in WP4.0, WC 2.2.6 and Abandoned Cart 1.1.

    In this case it’s a multisite setup and that causes issues when quering the user table: ‘$wpdb->prefix’ will include the ID of the sub-site whereas the user table is prefixed by ‘$wpdb->base_prefix’ only.
    Same construction on line 671 needs to be changed as well. Also in send_email.php, line 138.
    As soon as i apply this fix, my abandoned orders show up again – at least in multisite.

    Hope this helps.

    Kind regards,
    Peter

    Plugin Author Vishal Kothari

    (@ashokrane)

    Hello Peter,

    Thank you for the fix.

    This bug has also been fixed in version 1.2 that was released yesterday.

    Regards,
    Vishal Kothari

    peter

    (@dewebbouwmeester)

    Hi Ashok!
    Thanks for your quick reply! I should have noticed the newer version. Sorry about that.

    I’ve immediately tried it but the same problem occurs.
    Version 1.2 still uses ‘…”.$wpdb->prefix.”users AS…’ on some lines.
    In a multisite setup this results in a table name like ‘wp_999_users’. But there are no sub-site user tables. Only 1 shared user table exists for all sub-sites and this table can be refered to in your query as ‘$wpdb->base_prefix.”users’.
    When i apply this ‘base’ fix to version 1.2, the abandoned carts are listed again as expected. Or am i missing a point?

    Kind regards,
    Peter

    Plugin Author Vishal Kothari

    (@ashokrane)

    Hi Peter,

    I get your point. Your issue is specific to multi-site installs.

    We will apply your fix to the next version & try to release it in next couple of days.

    :Vishal

    peter

    (@dewebbouwmeester)

    Hi Vishal,
    Thanks for you quick reply and i’ll look forward to the next version!
    Cheers,
    Peter

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Plugin broken – mysql_num_rows error’ is closed to new replies.