WordPress.org

Ready to get started?Download WordPress

Forums

eShop Order Emailer
[resolved] Fails when using different db table prefix (2 posts)

  1. gmangesh
    Member
    Posted 2 years ago #

    The plugin does not select any orders if your tables are prefixed with anything other than "wp_".
    This is because the SELECT statement in the order_query() function references this table "wp_eshop_states" without accounting for custom prefixes.

    This is the query:
    $sql = "SELECT o.*,oi.item_id, oi.item_qty, oi.optname, oi.weight, s.code FROM $orders_table o LEFT JOIN $order_items_table oi ON o.checkid = oi.checkid, wp_eshop_states s WHERE s.id = o.state AND o.id NOT IN (SELECT eshop_order_id FROM $pws_orders_emailed_table ) AND o.status = 'Completed'"

    If you are using custom table prefixes, change "wp_eshop_states" to the correct table name in the wp-content/plugins/eshop-order-emailer/eordem.php file

    http://wordpress.org/extend/plugins/eshop-order-emailer/

  2. paulswebsolutions
    Member
    Posted 2 years ago #

    Thanks for the feedback gmangesh. Yes, the previous version of the plugin was quite rough as it was a quick spin-off project and I was just gauging interest in it. Version 2 has been completely re-written and should be a lot more robust.

    Best wishes

    Paul

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic