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

  1. gmangesh
    Posted 3 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


  2. paulswebsolutions
    Posted 3 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


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • eShop Order Emailer
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic