Changeset 1888890
- Timestamp:
- 06/07/2018 01:39:15 PM (8 years ago)
- Location:
- woocommerce-auto-category-thumbnails/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
woocommerce-auto-cat-thumbnails.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-auto-category-thumbnails/trunk/readme.txt
r1750656 r1888890 3 3 Tags: woocommerce, ecommerce, e-commerce, wordpress ecommerce, shopping, categories 4 4 Requires at least: 4.0 5 Tested up to: 4. 8.25 Tested up to: 4.9.6 6 6 Donate link: http://patreon.com/shellbot 7 7 Stable tag: trunk … … 13 13 == Description == 14 14 15 ** 22/10/17- Updated for the latest version of WooCommerce **15 ** 07/06/18 - Updated for the latest version of WooCommerce ** 16 16 17 17 By default, WooCommerce displays a neutral and uninteresting category image placeholder in those cases where a category has … … 48 48 == Changelog == 49 49 50 = 1.2.1 = 51 52 * Fixed issue with category image size in newer versions of WooCommerce 53 50 54 = 1.2 = 51 55 * Fixed incompatibility with latest version of WooCommerce due to changed handling of product visibility setting -
woocommerce-auto-category-thumbnails/trunk/woocommerce-auto-cat-thumbnails.php
r1750656 r1888890 4 4 Plugin URI: http://codebyshellbot.com/wordpress-plugins/woocommerce-auto-category-thumbnails/ 5 5 Description: Automatically display a relevant product image if category thumbnails are not set. 6 Version: 1.2 6 Version: 1.2.1 7 7 Author: Shellbot 8 8 Author URI: http://codebyshellbot.com … … 94 94 //Query DB 95 95 $product = get_posts( $query_args ); 96 97 //Support new woocommerce_thumbnail image size but keep backwards compatibility 98 if( in_array( 'woocommerce_thumbnail', get_intermediate_image_sizes() ) ) { 99 $sizename = 'woocommerce_thumbnail'; 100 } else { 101 $sizename = 'shop_thumbnail'; 102 } 96 103 97 104 //If matching product found, check for a thumbnail, otherwise fall back 98 105 if( $product && has_post_thumbnail( $product[0]->ID ) ) { 99 echo get_the_post_thumbnail( $product[0]->ID, 'shop_thumbnail');106 echo get_the_post_thumbnail( $product[0]->ID, $sizename ); 100 107 } else { 101 108 woocommerce_subcategory_thumbnail( $cat );
Note: See TracChangeset
for help on using the changeset viewer.