Conversation
supportThe plug-in is wonderful to give bulk discount while using wp 3.4.2. After upgrading to 3.5, the system throwing warning message about the wpdb. I have to disable it first and wait for the upgrade. http://wordpress.org/extend/plugins/wp-e-commerce-bulk-category-pricing/
I’m getting something similar Warning: Missing argument 2 for wpdb::prepare(), called in /../../public_html/wp-content/plugins/wp-e-commerce-bulk-category-pricing/wpec_bulk_cat.php on line 146 and defined in /../../public_html/wp-includes/wp-db.php on line 990 any help would be appreciated like the poster above me have also had to disable, checked the two files mentioned and can see nothing wrong in comparison to my backups. Thanks Tom
Finally I solved the issue. It’s because of the security warning from wordpress 3.5 for using wpdb method in insecure way. What I do is in wpec_bulk_cat.php, try to search $bulk_categories = $wpdb->get_col (&wpdb->prepare("SELECT object_id FROM “.WPSC_TABLE_META.” WHERE meta_key` = ‘use_bulk_pricing’ AND meta_value = 1″ )); change the whole line to $bulk_categories = $wpdb->get_col(“SELECT object_id FROM ".WPSC_TABLE_META." WHERE meta_key = ‘use_bulk_pricing’ AND meta_value = 1″ );` Then everything backs to normal
Thanks so much worked like a charm!
Thanks ChiehMin! It works great!
I’m getting something similar Warning: Missing argument 2 for wpdb::prepare(), called in /../../public_html/wp-content/plugins/wp-e-commerce-bulk-category-pricing/wpec_bulk_cat.php on line 146 and defined in /../../public_html/wp-includes/wp-db.php on line 990 any help would be appreciated like the poster above me have also had to disable, checked the two files mentioned and can see nothing wrong in comparison to my backups. Thanks Tom
Finally I solved the issue. It’s because of the security warning from wordpress 3.5 for using wpdb method in insecure way. What I do is in wpec_bulk_cat.php, try to search $bulk_categories = $wpdb->get_col (&wpdb->prepare("SELECT object_id FROM “.WPSC_TABLE_META.” WHERE meta_key` = ‘use_bulk_pricing’ AND meta_value = 1″ )); change the whole line to $bulk_categories = $wpdb->get_col(“SELECT object_id FROM ".WPSC_TABLE_META." WHERE meta_key = ‘use_bulk_pricing’ AND meta_value = 1″ );` Then everything backs to normal
Thanks so much worked like a charm!
Thanks ChiehMin! It works great!