WP Customer Reviews – shortcodes

The plugin registrer some shortcodes in wp-custom-reviews.php: add_shortcode( ‘WPCR_INSERT’, array(&$this, ‘shortcode_wpcr_insert’) ); add_shortcode( ‘WPCR_SHOW’, array(&$this, ‘shortcode_wpcr_show’) ); Try: [WPCR_INSERT] and [WPCR_SHOW]

submit for review issue

Weird.. Have you checked the database on your own? Are you in the administrator group? Get your user id from the {tableprefix}_users table and search for the coresponding meta key {tableprefix}_user_level for your user id inside the {tableprefix}_usermeta table. The value should be set to 10. Do you have migrated the database from another wordpress … Read more

WooCommerce showing star rating review instead of text review string

Suffered with same problem. Finally after lot of search and trial I came up with this solution. This gets the template where the rating is displayed from. But it displays like this: Rated 4.50 out of 5 based on 2 customer ratings (2 customer reviews) <div class=”rating-custom”> <?php wc_get_template( ‘single-product/rating.php’ ); ?> </div> Then paste … Read more

Average Score of all ratings in comments

add this code into your plugin file to register activation hook // register activation hook register_activation_hook( __FILE__, ‘my_rating_plugin_activation’ ); now create a function and add your table creation code into function my_rating_plugin_activation() { global $wpdb, $rating_table_name; if($wpdb->get_var(“SHOW TABLES LIKE \”$rating_table_name\””) != $rating_table_name) { $wpdb->query(“CREATE TABLE IF NOT EXISTS $rating_table_name ( rating_id int(11) NOT NULL AUTO_INCREMENT, … Read more

Force “Submit to review” when a post is updated

It is possible to stop author to publish post, and force him to Submit For Preview. Just add this code to your functions.php and you are all done. <?php function take_away_publish_permissions() { $user = get_role(‘author’); $user->add_cap(‘publish_posts’,false); } add_action(‘init’, ‘take_away_publish_permissions’ ); ?> ** Updated Code ** This code shared here is for setting post status to … Read more

Let private posts stay in status “private” after edit through “editors”

As it doesn’t look as though the OP is coming back, I’m adding their answer as an answer rather than leaving it in the question: For everyone dealing with the same problem: I was able to fix it with a code snippet of another thread: https://wordpress.stackexchange.com/a/172556/87321 Just had to add the post status “pending”, so … Read more

TypeError: list indices must be integers, not str (boolean convertion actually)

Only change that needs to be made is that features must be initialized to a dict ({}) rather than a list ([]) and then you could populate it’s contents. The TypeError was because word_features is a list of strings which you were trying to index using a list and lists can’t have string indices. Here, the elements present in word_features constitute the keys of dictionary, features holding boolean values, True based on whether the same … Read more