Created
June 2, 2026 01:38
-
-
Save Pavracer/c30f03cf049320203a164f9099a3dbfd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AND ( txn.expires_at = '0000-00-00 00:00:00' OR | |
| txn.expires_at >= '2023-08-24 17:29:23' ) | |
| THEN '<span class=\"mepr-active\">Yes</span>' | |
| ELSE '<span class=\"mepr-inactive\">No</span>' | |
| END) AS `active` FROM wp0j_mepr_transactions AS txn /* IMPORTANT */ LEFT JOIN wp0j_users AS u ON u.ID = txn.user_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS prd ON prd.ID = txn.product_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS c ON c.ID = txn.coupon_id LEFT JOIN wp0j_postmeta AS pm_period_type ON pm_period_type.post_id = prd.ID AND pm_period_type.meta_key = '_mepr_product_period_type' WHERE (txn.subscription_id IS NULL OR txn.subscription_id <= 0) AND ( | |
| ISNULL( | |
| ( | |
| SELECT m.meta_value | |
| FROM wp0j_mepr_transaction_meta AS m | |
| WHERE m.transaction_id = txn.id | |
| AND m.meta_key IN ('_is_gift_complete', '_gifter_txn') | |
| AND m.meta_value >= '1' | |
| LIMIT 1 | |
| ) | |
| ) | |
| ) ORDER BY `ID` DESC LIMIT 0,10 | |
| [24-Aug-2023 17:29:23 UTC] *** MemberPress Debug: List Table Total Query: SELECT COUNT(*) FROM wp0j_mepr_transactions AS txn /* IMPORTANT */ LEFT JOIN wp0j_users AS u ON u.ID = txn.user_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS prd ON prd.ID = txn.product_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS c ON c.ID = txn.coupon_id WHERE (txn.subscription_id IS NULL OR txn.subscription_id <= 0) AND ( | |
| ISNULL( | |
| ( | |
| SELECT m.meta_value | |
| FROM wp0j_mepr_transaction_meta AS m | |
| WHERE m.transaction_id = txn.id | |
| AND m.meta_key IN ('_is_gift_complete', '_gifter_txn') | |
| AND m.meta_value >= '1' | |
| LIMIT 1 | |
| ) | |
| ) | |
| ) | |
| [24-Aug-2023 17:29:23 UTC] *** MemberPress Debug: List Table Query Time: 0.0011260509490967 sec | |
| [24-Aug-2023 17:29:23 UTC] *** MemberPress Debug: List Table Total Query Time: 0.00042104721069336 sec | |
| [24-Aug-2023 17:29:23 UTC] *** MemberPress Debug: List Table Query: SELECT 'subscription' AS `sub_type`, sub.id AS `id`, u.user_email AS `user_email`, sub.gateway AS `gateway`, u.user_login AS `member`, | |
| (SELECT um_fname.meta_value | |
| FROM wp0j_usermeta AS um_fname | |
| WHERE um_fname.user_id = u.ID | |
| AND um_fname.meta_key = 'first_name' | |
| LIMIT 1) | |
| AS `first_name`, | |
| (SELECT um_lname.meta_value | |
| FROM wp0j_usermeta AS um_lname | |
| WHERE um_lname.user_id = u.ID | |
| AND um_lname.meta_key = 'last_name' | |
| LIMIT 1) | |
| AS `last_name`, prd.post_title AS `product_name`, first_txn.id AS `first_txn_id`, last_txn.id AS `latest_txn_id`, expiring_txn.id AS `expiring_txn_id`, | |
| (SELECT COUNT(*) | |
| FROM wp0j_mepr_transactions AS txn_cnt | |
| WHERE txn_cnt.subscription_id=sub.id | |
| AND txn_cnt.status='complete') AS `txn_count`, expiring_txn.expires_at AS `expires_at`, sub.subscr_id AS `subscr_id`, sub.user_id AS `user_id`, sub.product_id AS `product_id`, sub.coupon_id AS `coupon_id`, sub.price AS `price`, sub.period AS `period`, sub.period_type AS `period_type`, sub.limit_cycles AS `limit_cycles`, sub.limit_cycles_num AS `limit_cycles_num`, sub.limit_cycles_action AS `limit_cycles_action`, sub.limit_cycles_expires_after AS `limit_cycles_expires_after`, sub.limit_cycles_expires_type AS `limit_cycles_expires_type`, sub.prorated_trial AS `prorated_trial`, sub.trial AS `trial`, sub.trial_days AS `trial_days`, sub.trial_amount AS `trial_amount`, sub.trial_tax_amount AS `trial_tax_amount`, sub.trial_tax_reversal_amount AS `trial_tax_reversal_amount`, sub.trial_total AS `trial_total`, sub.status AS `status`, sub.created_at AS `created_at`, sub.total AS `total`, sub.tax_rate AS `tax_rate`, sub.tax_amount AS `tax_amount`, sub.tax_reversal_amount AS `tax_reversal_amount`, sub.tax_desc AS `tax_desc`, sub.tax_class AS `tax_class`, sub.cc_last4 AS `cc_last4`, sub.cc_exp_month AS `cc_exp_month`, sub.cc_exp_year AS `cc_exp_year`, sub.token AS `token`, sub.order_id AS `order_id`, | |
| (SELECT | |
| CASE | |
| WHEN expiring_txn.expires_at = 0 | |
| OR expiring_txn.expires_at = '0000-00-00 00:00:00' | |
| THEN '<span class=\"mepr-active\">Yes</span>' | |
| WHEN expiring_txn.expires_at IS NULL | |
| OR expiring_txn.expires_at < '2023-08-24 17:29:23' | |
| THEN '<span class=\"mepr-inactive\">No</span>' | |
| WHEN expiring_txn.status IN ('confirmed','complete') | |
| AND expiring_txn.txn_type IN ('subscription_confirmation','sub_account','wc_transaction') | |
| THEN '<span class=\"mepr-active\">Yes</span>' | |
| ELSE '<span class=\"mepr-active\">Yes</span>' | |
| END | |
| ) AS `active` FROM wp0j_mepr_subscriptions AS sub /* IMPORTANT */ LEFT JOIN wp0j_users AS u ON u.ID = sub.user_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS prd ON prd.ID = sub.product_id LEFT JOIN wp0j_mepr_transactions AS first_txn | |
| ON first_txn.id=( | |
| SELECT ft1.id | |
| FROM wp0j_mepr_transactions AS ft1 | |
| WHERE ft1.subscription_id=sub.id | |
| AND ft1.status IN ('confirmed','complete') | |
| ORDER BY ft1.id ASC | |
| LIMIT 1 | |
| ) LEFT JOIN wp0j_mepr_transactions AS last_txn | |
| ON last_txn.id=( | |
| SELECT lt1.id | |
| FROM wp0j_mepr_transactions AS lt1 | |
| WHERE lt1.subscription_id=sub.id | |
| AND lt1.status IN ('confirmed','complete') | |
| ORDER BY lt1.id DESC | |
| LIMIT 1 | |
| ) LEFT JOIN wp0j_mepr_transactions AS expiring_txn | |
| ON expiring_txn.id = ( | |
| SELECT t.id | |
| FROM wp0j_mepr_transactions AS t | |
| WHERE t.subscription_id=sub.id | |
| AND t.status IN ('confirmed','complete') | |
| AND ( t.expires_at = '0000-00-00 00:00:00' | |
| OR ( t.expires_at <> '0000-00-00 00:00:00' | |
| AND t.expires_at=( | |
| SELECT MAX(t2.expires_at) | |
| FROM wp0j_mepr_transactions as t2 | |
| WHERE t2.subscription_id=sub.id | |
| AND t2.status IN ('confirmed','complete') | |
| ) | |
| ) | |
| ) | |
| ORDER BY t.expires_at | |
| LIMIT 1 | |
| ) ORDER BY `ID` DESC LIMIT 0,10 | |
| [24-Aug-2023 17:29:23 UTC] *** MemberPress Debug: List Table Total Query: SELECT COUNT(*) FROM wp0j_mepr_subscriptions AS sub /* IMPORTANT */ LEFT JOIN wp0j_users AS u ON u.ID = sub.user_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS prd ON prd.ID = sub.product_id | |
| [24-Aug-2023 17:29:23 UTC] *** MemberPress Debug: List Table Query Time: 0.0021688938140869 sec | |
| [24-Aug-2023 17:29:23 UTC] *** MemberPress Debug: List Table Total Query Time: 0.00030088424682617 sec | |
| [24-Aug-2023 17:43:31 UTC] *** MemberPress Debug: List Table Query: SELECT 'transaction' AS `sub_type`, txn.id AS `id`, u.user_email AS `user_email`, (SELECT CASE txn.gateway WHEN 'rzt9wx-5u3' THEN 'Authorize.net (Credit Card) (Authorize.net Profile)' WHEN 'rzwenv-3sb' THEN 'Stripe (Stripe)' WHEN 'rzwkac-15z' THEN 'TEST ONLY (Authorize.net Profile)' WHEN 'free' THEN 'Free (Free)' WHEN 'manual' THEN 'Manual (Manual)' ELSE 'Unknown' END) AS `gateway`, u.user_login AS `member`, (SELECT um_fname.meta_value FROM wp0j_usermeta AS um_fname WHERE um_fname.user_id = u.ID AND um_fname.meta_key = 'first_name' LIMIT 1) AS `first_name`, (SELECT um_lname.meta_value FROM wp0j_usermeta AS um_lname WHERE um_lname.user_id = u.ID AND um_lname.meta_key = 'last_name' LIMIT 1) AS `last_name`, prd.post_title AS `product_name`, txn.id AS `first_txn_id`, txn.id AS `latest_txn_id`, txn.id AS `expiring_txn_id`, '1' AS `txn_count`, txn.expires_at AS `expires_at`, txn.trans_num AS `subscr_id`, txn.user_id AS `user_id`, txn.product_id AS `product_id`, txn.coupon_id AS `coupon_id`, c.post_title AS `coupon`, txn.amount AS `price`, 1 AS `period`, 'lifetime' AS `period_type`, 0 AS `prorated_trial`, 0 AS `trial`, 0 AS `trial_days`, 0.000000 AS `trial_amount`, 0.000000 AS `trial_tax_amount`, 0.000000 AS `trial_total`, 'None' AS `status`, txn.created_at AS `created_at`, | |
| (SELECT | |
| CASE | |
| WHEN txn.status IN ('complete','confirmed') | |
| AND ( txn.expires_at = '0000-00-00 00:00:00' OR | |
| txn.expires_at >= '2023-08-24 17:43:31' ) | |
| THEN '<span class=\"mepr-active\">Yes</span>' | |
| ELSE '<span class=\"mepr-inactive\">No</span>' | |
| END) AS `active` FROM wp0j_mepr_transactions AS txn /* IMPORTANT */ LEFT JOIN wp0j_users AS u ON u.ID = txn.user_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS prd ON prd.ID = txn.product_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS c ON c.ID = txn.coupon_id LEFT JOIN wp0j_postmeta AS pm_period_type ON pm_period_type.post_id = prd.ID AND pm_period_type.meta_key = '_mepr_product_period_type' WHERE (txn.subscription_id IS NULL OR txn.subscription_id <= 0) AND ( | |
| ISNULL( | |
| ( | |
| SELECT m.meta_value | |
| FROM wp0j_mepr_transaction_meta AS m | |
| WHERE m.transaction_id = txn.id | |
| AND m.meta_key IN ('_is_gift_complete', '_gifter_txn') | |
| AND m.meta_value >= '1' | |
| LIMIT 1 | |
| ) | |
| ) | |
| ) ORDER BY `ID` DESC LIMIT 0,10 | |
| [24-Aug-2023 17:43:31 UTC] *** MemberPress Debug: List Table Total Query: SELECT COUNT(*) FROM wp0j_mepr_transactions AS txn /* IMPORTANT */ LEFT JOIN wp0j_users AS u ON u.ID = txn.user_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS prd ON prd.ID = txn.product_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS c ON c.ID = txn.coupon_id WHERE (txn.subscription_id IS NULL OR txn.subscription_id <= 0) AND ( | |
| ISNULL( | |
| ( | |
| SELECT m.meta_value | |
| FROM wp0j_mepr_transaction_meta AS m | |
| WHERE m.transaction_id = txn.id | |
| AND m.meta_key IN ('_is_gift_complete', '_gifter_txn') | |
| AND m.meta_value >= '1' | |
| LIMIT 1 | |
| ) | |
| ) | |
| ) | |
| [24-Aug-2023 17:43:31 UTC] *** MemberPress Debug: List Table Query Time: 0.0019729137420654 sec | |
| [24-Aug-2023 17:43:31 UTC] *** MemberPress Debug: List Table Total Query Time: 0.00054812431335449 sec | |
| [24-Aug-2023 17:43:31 UTC] *** MemberPress Debug: List Table Query: SELECT 'subscription' AS `sub_type`, sub.id AS `id`, u.user_email AS `user_email`, sub.gateway AS `gateway`, u.user_login AS `member`, | |
| (SELECT um_fname.meta_value | |
| FROM wp0j_usermeta AS um_fname | |
| WHERE um_fname.user_id = u.ID | |
| AND um_fname.meta_key = 'first_name' | |
| LIMIT 1) | |
| AS `first_name`, | |
| (SELECT um_lname.meta_value | |
| FROM wp0j_usermeta AS um_lname | |
| WHERE um_lname.user_id = u.ID | |
| AND um_lname.meta_key = 'last_name' | |
| LIMIT 1) | |
| AS `last_name`, prd.post_title AS `product_name`, first_txn.id AS `first_txn_id`, last_txn.id AS `latest_txn_id`, expiring_txn.id AS `expiring_txn_id`, | |
| (SELECT COUNT(*) | |
| FROM wp0j_mepr_transactions AS txn_cnt | |
| WHERE txn_cnt.subscription_id=sub.id | |
| AND txn_cnt.status='complete') AS `txn_count`, expiring_txn.expires_at AS `expires_at`, sub.subscr_id AS `subscr_id`, sub.user_id AS `user_id`, sub.product_id AS `product_id`, sub.coupon_id AS `coupon_id`, sub.price AS `price`, sub.period AS `period`, sub.period_type AS `period_type`, sub.limit_cycles AS `limit_cycles`, sub.limit_cycles_num AS `limit_cycles_num`, sub.limit_cycles_action AS `limit_cycles_action`, sub.limit_cycles_expires_after AS `limit_cycles_expires_after`, sub.limit_cycles_expires_type AS `limit_cycles_expires_type`, sub.prorated_trial AS `prorated_trial`, sub.trial AS `trial`, sub.trial_days AS `trial_days`, sub.trial_amount AS `trial_amount`, sub.trial_tax_amount AS `trial_tax_amount`, sub.trial_tax_reversal_amount AS `trial_tax_reversal_amount`, sub.trial_total AS `trial_total`, sub.status AS `status`, sub.created_at AS `created_at`, sub.total AS `total`, sub.tax_rate AS `tax_rate`, sub.tax_amount AS `tax_amount`, sub.tax_reversal_amount AS `tax_reversal_amount`, sub.tax_desc AS `tax_desc`, sub.tax_class AS `tax_class`, sub.cc_last4 AS `cc_last4`, sub.cc_exp_month AS `cc_exp_month`, sub.cc_exp_year AS `cc_exp_year`, sub.token AS `token`, sub.order_id AS `order_id`, | |
| (SELECT | |
| CASE | |
| WHEN expiring_txn.expires_at = 0 | |
| OR expiring_txn.expires_at = '0000-00-00 00:00:00' | |
| THEN '<span class=\"mepr-active\">Yes</span>' | |
| WHEN expiring_txn.expires_at IS NULL | |
| OR expiring_txn.expires_at < '2023-08-24 17:43:31' | |
| THEN '<span class=\"mepr-inactive\">No</span>' | |
| WHEN expiring_txn.status IN ('confirmed','complete') | |
| AND expiring_txn.txn_type IN ('subscription_confirmation','sub_account','wc_transaction') | |
| THEN '<span class=\"mepr-active\">Yes</span>' | |
| ELSE '<span class=\"mepr-active\">Yes</span>' | |
| END | |
| ) AS `active` FROM wp0j_mepr_subscriptions AS sub /* IMPORTANT */ LEFT JOIN wp0j_users AS u ON u.ID = sub.user_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS prd ON prd.ID = sub.product_id LEFT JOIN wp0j_mepr_transactions AS first_txn | |
| ON first_txn.id=( | |
| SELECT ft1.id | |
| FROM wp0j_mepr_transactions AS ft1 | |
| WHERE ft1.subscription_id=sub.id | |
| AND ft1.status IN ('confirmed','complete') | |
| ORDER BY ft1.id ASC | |
| LIMIT 1 | |
| ) LEFT JOIN wp0j_mepr_transactions AS last_txn | |
| ON last_txn.id=( | |
| SELECT lt1.id | |
| FROM wp0j_mepr_transactions AS lt1 | |
| WHERE lt1.subscription_id=sub.id | |
| AND lt1.status IN ('confirmed','complete') | |
| ORDER BY lt1.id DESC | |
| LIMIT 1 | |
| ) LEFT JOIN wp0j_mepr_transactions AS expiring_txn | |
| ON expiring_txn.id = ( | |
| SELECT t.id | |
| FROM wp0j_mepr_transactions AS t | |
| WHERE t.subscription_id=sub.id | |
| AND t.status IN ('confirmed','complete') | |
| AND ( t.expires_at = '0000-00-00 00:00:00' | |
| OR ( t.expires_at <> '0000-00-00 00:00:00' | |
| AND t.expires_at=( | |
| SELECT MAX(t2.expires_at) | |
| FROM wp0j_mepr_transactions as t2 | |
| WHERE t2.subscription_id=sub.id | |
| AND t2.status IN ('confirmed','complete') | |
| ) | |
| ) | |
| ) | |
| ORDER BY t.expires_at | |
| LIMIT 1 | |
| ) ORDER BY `ID` DESC LIMIT 0,10 | |
| [24-Aug-2023 17:43:31 UTC] *** MemberPress Debug: List Table Total Query: SELECT COUNT(*) FROM wp0j_mepr_subscriptions AS sub /* IMPORTANT */ LEFT JOIN wp0j_users AS u ON u.ID = sub.user_id /* IMPORTANT */ LEFT JOIN wp0j_posts AS prd ON prd.ID = sub.product_id | |
| [24-Aug-2023 17:43:31 UTC] *** MemberPress Debug: List Table Query Time: 0.0023441314697266 sec | |
| [24-Aug-2023 17:43:31 UTC] *** MemberPress Debug: List Table Total Query Time: 0.00038409233093262 sec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment