Created
December 17, 2018 13:54
-
-
Save code-flow/4e080a224b87d49bc5d7ab60857338d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: snip - WooCommerce review args | |
Plugin URI: https://rich-snippets.io/woocommerce-review-args-hook/ | |
Description: Changes arguments on WooCommerce reviews | |
Version: 0.1.0 | |
License: License: GPLv2 or later | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} // Exit if accessed directly | |
add_filter( 'wpbuddy/rich_snippets/woocommerce/reviews/args', function ( $args ) { | |
/** | |
* To load 20 instead of 5 reviews for WooCommerce | |
*/ | |
$args['number'] = 20; | |
return $args; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This WordPress plugin changes the number of WooCommerce reviews loaded for SNIP - The Structured Data and Rich Snippets WordPress Plugin. Learn more about this plugin and how you can add more arguments to change how the loading of reviews behaves: https://rich-snippets.io/woocommerce-review-args-hook/