diff --git a/includes/class-vendor.php b/includes/class-vendor.php index 6e3dd2b9a8..724ae69c28 100644 --- a/includes/class-vendor.php +++ b/includes/class-vendor.php @@ -626,9 +626,9 @@ public function get_balance( $formatted = true, $on_date= '' ) { if ( ! $installed_version || version_compare( $installed_version, '2.8.2', '>' ) ) { $result = $wpdb->get_row( $wpdb->prepare( "SELECT SUM(debit) as earnings, - ( SELECT SUM(credit) FROM {$wpdb->prefix}dokan_vendor_balance WHERE vendor_id = %d AND DATE(balance_date) <= '%s' ) as withdraw + ( SELECT SUM(credit) FROM {$wpdb->prefix}dokan_vendor_balance WHERE vendor_id = %d AND DATE(balance_date) <= %s ) as withdraw from {$wpdb->prefix}dokan_vendor_balance - WHERE vendor_id = '%d' AND DATE(balance_date) <= '%s' AND status IN($status)", + WHERE vendor_id = %d AND DATE(balance_date) <= %s AND status IN($status)", $this->id, $on_date, $this->id, $on_date ) ); } else { $result = $wpdb->get_row( $wpdb->prepare( diff --git a/includes/upgrades/dokan-upgrade-2.9.13.php b/includes/upgrades/dokan-upgrade-2.9.13.php index 5449b8902f..a0ab927abb 100644 --- a/includes/upgrades/dokan-upgrade-2.9.13.php +++ b/includes/upgrades/dokan-upgrade-2.9.13.php @@ -14,7 +14,7 @@ function dokan_update_spmv_product_map_table_2_9_13() { return; } - $columns = $wpdb->get_results( "describe {$map_table}" ); + $columns = $wpdb->get_results( $wpdb->prepare( "describe `{$wpdb->prefix}dokan_product_map`" ); $columns = array_filter( $columns, function ( $column ) { return 'visibility' === $column->Field; @@ -22,7 +22,7 @@ function dokan_update_spmv_product_map_table_2_9_13() { if ( empty( $columns ) ) { $wpdb->query( - "alter table {$map_table} add column visibility tinyint(1) default 1" + $wpdb->prepare( "alter table `{$wpdb->prefix}dokan_product_map` add column visibility tinyint(1) default %d", 1 ); ); } } diff --git a/phpcs.xml.dist b/phpcs.xml.dist index c31e8c09b2..451d492a4c 100755 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -2,9 +2,9 @@ Generally-applicable sniffs for WordPress plugins - + */assets/* */src/* @@ -21,7 +21,11 @@ + . - + + + + diff --git a/templates/admin-setup-wizard/run-wizard-notice.php b/templates/admin-setup-wizard/run-wizard-notice.php index 53a19f91f2..14cef3983e 100644 --- a/templates/admin-setup-wizard/run-wizard-notice.php +++ b/templates/admin-setup-wizard/run-wizard-notice.php @@ -1,4 +1,4 @@
-

Welcome to Dokan – You‘re almost ready to start selling :)', 'dokan-lite' ); ?>

-

+

Welcome to Dokan – You‘re almost ready to start selling :)', 'dokan-lite' ) ); ?>

+

diff --git a/templates/dashboard/big-counter-widget.php b/templates/dashboard/big-counter-widget.php index 72d5f275c1..f0dc20048a 100644 --- a/templates/dashboard/big-counter-widget.php +++ b/templates/dashboard/big-counter-widget.php @@ -15,15 +15,15 @@