Hello. Thanks for your contribution to extend Sensei LMS.
Your changelog on the Development tab says version 1.3.1 added compatibility with WordPress 5.0.3. However, your Readme.txt file states you tested up to WordPress 5.7.
I think other users might find this misleading and feel deterred from downloading.
]]>I am receiving the following error on my dashboard:
You called the draw() method with the wrong type of data rather than a DataTable or DataView×
This is consistent. The rest of the dashboard works fine.
]]>All of your direct $wpdb
query calls are incorrect. If you’re doing a select from a specific table, you should be using the $wpdb
global, not specifically wp_comments
or wp_postmeta
Example your incorrect code:
$most_sell_courses = $wpdb->get_results( "SELECT 'meta_value', 'post_id' FROM 'wp_postmeta' WHERE 'meta_key' LIKE '%total_sales%' and meta_value > 0", OBJECT );
Correct code:
$most_sell_courses = $wpdb->get_results( "SELECT 'meta_value', 'post_id' FROM $wpdb->postmeta WHERE 'meta_key' LIKE '%total_sales%' and meta_value > 0", OBJECT );
Basically anywhere you are specifically using wp_XXX
you need to use $wpdb->prefix
or just directly call $wpdb->XXX
… reason being, if the standard wp_
prefix is not used, your plugin will not function at all.
See documentation:
https://codex.www.ads-software.com/Class_Reference/wpdb
when Sensei comes from Git line 31 of woo-sensei-stats.php has to go
from
if( !is_plugin_active( 'woothemes-sensei/woothemes-sensei.php'
to
if( !is_plugin_active( 'sensei/woothemes-sensei.php'
Same w/ your Shortcode Plugin for Sensei ??
]]>