Skip to content

Commit

Permalink
1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster committed Mar 10, 2017
1 parent 543af0e commit e3cbfa2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 35 deletions.
48 changes: 20 additions & 28 deletions languages/woocommerce-product-archive-customiser.pot
Original file line number Diff line number Diff line change
@@ -1,92 +1,84 @@
# Copyright (C) 2016 WooCommerce Product Archive Customiser
# Copyright (C) 2017 WooCommerce Product Archive Customiser
# This file is distributed under the same license as the WooCommerce Product Archive Customiser package.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce Product Archive Customiser 1.0.0\n"
"Project-Id-Version: WooCommerce Product Archive Customiser 1.0.5\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-"
"product-archive-customiser\n"
"POT-Creation-Date: 2016-04-28 12:29:00+00:00\n"
"POT-Creation-Date: 2017-03-10 13:03:48+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"

#: woocommerce-product-archive-customiser.php:211
#: woocommerce-product-archive-customiser.php:213
msgid "Product Archives"
msgstr ""

#: woocommerce-product-archive-customiser.php:225
#: woocommerce-product-archive-customiser.php:227
msgid "Product columns"
msgstr ""

#: woocommerce-product-archive-customiser.php:247
#: woocommerce-product-archive-customiser.php:249
msgid "Products per page"
msgstr ""

#: woocommerce-product-archive-customiser.php:288
#: woocommerce-product-archive-customiser.php:290
msgid "Display product count"
msgstr ""

#: woocommerce-product-archive-customiser.php:304
#: woocommerce-product-archive-customiser.php:306
msgid "Display product sorting"
msgstr ""

#: woocommerce-product-archive-customiser.php:320
#: woocommerce-product-archive-customiser.php:322
msgid "Display sale flashes"
msgstr ""

#: woocommerce-product-archive-customiser.php:336
#: woocommerce-product-archive-customiser.php:338
msgid "Display add to cart buttons"
msgstr ""

#: woocommerce-product-archive-customiser.php:352
#: woocommerce-product-archive-customiser.php:354
msgid "Display product image"
msgstr ""

#: woocommerce-product-archive-customiser.php:368
#: woocommerce-product-archive-customiser.php:370
msgid "Display prices"
msgstr ""

#: woocommerce-product-archive-customiser.php:384
#: woocommerce-product-archive-customiser.php:386
msgid "Display ratings"
msgstr ""

#: woocommerce-product-archive-customiser.php:400
#: woocommerce-product-archive-customiser.php:402
msgid "Display new badge"
msgstr ""

#: woocommerce-product-archive-customiser.php:416
#: woocommerce-product-archive-customiser.php:418
msgid "Display the \"New\" badge for how many days"
msgstr ""

#: woocommerce-product-archive-customiser.php:439
#: woocommerce-product-archive-customiser.php:441
msgid "Display categories"
msgstr ""

#: woocommerce-product-archive-customiser.php:455
#: woocommerce-product-archive-customiser.php:457
msgid "Display stock"
msgstr ""

#: woocommerce-product-archive-customiser.php:632
#: woocommerce-product-archive-customiser.php:684
msgid "New"
msgstr ""

#: woocommerce-product-archive-customiser.php:656
msgid "Out of stock"
msgstr ""

#: woocommerce-product-archive-customiser.php:658
msgid "%s in stock"
msgstr ""

#. Plugin Name of the plugin/theme
msgid "WooCommerce Product Archive Customiser"
msgstr ""

#. Plugin URI of the plugin/theme
msgid "http://jameskoster.co.uk/tag/product-archive-customiser/"
msgid "https://wordpress.org/plugins/woocommerce-product-archive-customiser/"
msgstr ""

#. Description of the plugin/theme
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: jameskoster
Tags: woocommerce, ecommerce, products
Requires at least: 4.4
Tested up to: 4.6.1
Stable tag: 1.0.4
Tested up to: 4.7.3
Stable tag: 1.0.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -49,6 +49,9 @@ function remove_pac_styles() {

== Changelog ==

= 1.0.5 - 08/11/2017 =
* Tweak - WooCommerce 2.7 compatibility.

= 1.0.4 - 08/11/2016 =
* Tweak - Added a css fallback to hide elements in themes that use priorities that are different to WooCommerce core when hooking in related functions.

Expand Down
14 changes: 9 additions & 5 deletions woocommerce-product-archive-customiser.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* Plugin Name: WooCommerce Product Archive Customiser
* Plugin URI: https://wordpress.org/plugins/woocommerce-product-archive-customiser/
* Version: 1.0.4
* Version: 1.0.5
* 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.
* Author: jameskoster
* Tested up to: 4.6.1
* Tested up to: 4.7.3
* Author URI: http://jameskoster.co.uk
* Text Domain: woocommerce-product-archive-customiser
* Domain Path: /languages/
Expand Down Expand Up @@ -48,7 +48,7 @@ final class WC_pac {
* The constructor!
*/
public function __construct() {
$this->version = '1.0.4';
$this->version = '1.0.5';

add_action( 'wp_enqueue_scripts', array( $this, 'wc_pac_styles' ) );
add_action( 'init', array( $this, 'wc_pac_setup' ) );
Expand Down Expand Up @@ -703,9 +703,13 @@ function woocommerce_pac_show_product_categories() {
*/
function woocommerce_pac_show_product_stock() {
global $product;
$stock = $product->get_total_stock();
$stock = $product->get_stock_quantity();
$product_availability = $product->get_availability();
$availability_text = $product_availability['availability'];
if ( $product_availability ) {
$availability_text = $product_availability['availability'];
} else {
$availability_text = '';
}

if ( $product->is_in_stock() ) {
echo '<p class="stock in-stock"><small>' . esc_attr( $availability_text ) . '</small></p>';
Expand Down

0 comments on commit e3cbfa2

Please sign in to comment.