I went to renew an ad and I got the error shown in the screenshot. The function you have is: function gc_renewal_periond() { global $wpdb, $price_table_name; $sql = "SELECT * FROM $price_table_name"; $QUERY = $wpdb->get_results($wpdb->prepare($sql)); foreach ($QUERY as $q) { if ($q->package_type == "pkg_free") { if ($q->renewal_cycle == "M") return $q->renewal_per * 30; if ($q->renewal_cycle == "Y") return $q->renewal_per * 365; if ($q->renewal_cycle == "D") return $q->renewal_per; } } } According to the wordpress documentation, the prepare() method now requires 2 parameters: Taken from http://codex.wordpress.org/Class_Reference/wpdb Please note: As of 3.5, wpdb:repare() enforces a minimum of 2 arguments. [more info] <?php $sql = $wpdb->prepare( 'query' , value_parameter[, value_parameter ... ] ); ?>