WooCommerce Product Archive Customiser - Version 1.0.1

Version Description

  • 29/04/2016 =
  • Fix - Products per page setting.
Download this release

Release Info

Developer jameskoster
Plugin Icon wp plugin WooCommerce Product Archive Customiser
Version 1.0.1
Comparing to
See all releases

Code changes from version 1.0.0 to 1.0.1

readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: jameskoster
3
  Tags: woocommerce, ecommerce, products
4
  Requires at least: 4.4
5
  Tested up to: 4.5.1
6
- Stable tag: 1.0.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -49,6 +49,9 @@ function remove_pac_styles() {
49
 
50
  == Changelog ==
51
 
 
 
 
52
  = 1.0.0 - 28/04/2016 =
53
  * New - All settings have been moved to the Customizer. Old settings should be automatically imported.
54
  * Tweak - Complete code tidy / removal of unused assets.
3
  Tags: woocommerce, ecommerce, products
4
  Requires at least: 4.4
5
  Tested up to: 4.5.1
6
+ Stable tag: 1.0.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
49
 
50
  == Changelog ==
51
 
52
+ = 1.0.1 - 29/04/2016 =
53
+ * Fix - Products per page setting.
54
+
55
  = 1.0.0 - 28/04/2016 =
56
  * New - All settings have been moved to the Customizer. Old settings should be automatically imported.
57
  * Tweak - Complete code tidy / removal of unused assets.
woocommerce-product-archive-customiser.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: WooCommerce Product Archive Customiser
4
  * Plugin URI: http://jameskoster.co.uk/tag/product-archive-customiser/
5
- * Version: 1.0.0
6
  * Description: Allows you to customise WooCommerce product archives. Change the number of product columns and the number of products displayed per page. Toggle the display of core elements and enable some that are not included in WooCommerce core such as stock levels and product categories.
7
  * Author: jameskoster
8
  * Tested up to: 4.5.1
@@ -48,15 +48,16 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
48
  * The constructor!
49
  */
50
  public function __construct() {
51
- $this->version = '1.0.0';
52
 
53
  add_action( 'wp_enqueue_scripts', array( $this, 'wc_pac_styles' ) );
54
  add_action( 'init', array( $this, 'wc_pac_setup' ) );
55
  add_action( 'wp', array( $this, 'wc_pac_fire_customisations' ) );
56
  add_action( 'wp', array( $this, 'wc_pac_columns' ) );
 
57
 
58
  // Upgrade script.
59
- if ( '1.0.0' === $this->version ) {
60
  add_action( 'plugins_loaded', array( $this, 'update_settings' ) );
61
  }
62
  }
@@ -516,10 +517,6 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
516
  * @return void
517
  */
518
  function wc_pac_fire_customisations() {
519
-
520
- // Products per page.
521
- add_filter( 'loop_shop_per_page', array( $this, 'woocommerce_pac_products_per_page' ), 20 );
522
-
523
  // Sale flash.
524
  if ( get_theme_mod( 'wc_pac_sale_flash' ) === false ) {
525
  remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );
@@ -614,6 +611,7 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
614
  */
615
  function woocommerce_pac_products_row() {
616
  $columns = get_theme_mod( 'wc_pac_columns' );
 
617
  return $columns;
618
  }
619
 
2
  /**
3
  * Plugin Name: WooCommerce Product Archive Customiser
4
  * Plugin URI: http://jameskoster.co.uk/tag/product-archive-customiser/
5
+ * Version: 1.0.1
6
  * Description: Allows you to customise WooCommerce product archives. Change the number of product columns and the number of products displayed per page. Toggle the display of core elements and enable some that are not included in WooCommerce core such as stock levels and product categories.
7
  * Author: jameskoster
8
  * Tested up to: 4.5.1
48
  * The constructor!
49
  */
50
  public function __construct() {
51
+ $this->version = '1.0.1';
52
 
53
  add_action( 'wp_enqueue_scripts', array( $this, 'wc_pac_styles' ) );
54
  add_action( 'init', array( $this, 'wc_pac_setup' ) );
55
  add_action( 'wp', array( $this, 'wc_pac_fire_customisations' ) );
56
  add_action( 'wp', array( $this, 'wc_pac_columns' ) );
57
+ add_filter( 'loop_shop_per_page', array( $this, 'woocommerce_pac_products_per_page' ), 20 );
58
 
59
  // Upgrade script.
60
+ if ( version_compare( $this->version, '1.0.0' ) >= 0 ) {
61
  add_action( 'plugins_loaded', array( $this, 'update_settings' ) );
62
  }
63
  }
517
  * @return void
518
  */
519
  function wc_pac_fire_customisations() {
 
 
 
 
520
  // Sale flash.
521
  if ( get_theme_mod( 'wc_pac_sale_flash' ) === false ) {
522
  remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );
611
  */
612
  function woocommerce_pac_products_row() {
613
  $columns = get_theme_mod( 'wc_pac_columns' );
614
+
615
  return $columns;
616
  }
617