Changeset 1431417
- Timestamp:
- 06/06/2016 12:37:43 PM (10 years ago)
- Location:
- woocommerce-superfaktura/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (2 diffs)
-
class-wc-superfaktura.php (modified) (6 diffs)
-
wc-superfaktura.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-superfaktura/trunk/README.txt
r1424201 r1431417 5 5 Requires at least: 4.0 6 6 Tested up to: 4.5.2 7 Stable tag: 1.5. 57 Stable tag: 1.5.6 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 63 63 64 64 == Changelog == 65 66 = 1.5.6 = 67 * Pridaná možnosť nastaviť si ako má vyzerať popis produktu vo faktúre 65 68 66 69 = 1.5.5 = -
woocommerce-superfaktura/trunk/class-wc-superfaktura.php
r1424199 r1431417 24 24 * @var string 25 25 */ 26 protected $version = '1.5. 5';26 protected $version = '1.5.6'; 27 27 28 28 /** … … 55 55 */ 56 56 protected $plugin_screen_hook_suffix = null; 57 58 /** 59 * Default product description template 60 * @var string 61 */ 62 protected $product_description_template_default; 57 63 58 64 /** … … 74 80 //add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) ); 75 81 add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts')); 82 83 // backward compatibility with previous (now gone) option 84 $this->product_description_template_default = '[ATTRIBUTES]' . ( 'yes' === get_option( 'woocommerce_sf_product_description_visibility', 'yes' ) ? "\n[SHORT_DESCR]" : '' ); 76 85 } 77 86 … … 433 442 $item_meta = new WC_Order_Item_Meta($item['item_meta']); 434 443 435 $variation_desc = '';436 if($item_meta->meta)437 $variation_desc = $item_meta->display(true, true, '_', ', ');438 439 444 $item_data = array( 440 445 'name' => $item['name'], … … 455 460 $product = wc_get_product( $product_id ); 456 461 457 $item_data['description'] = $variation_desc; 458 459 if ( get_option('woocommerce_sf_product_description_visibility') == 'yes' ) { 460 $item_data['description'] .= "\n".wp_strip_all_tags($product->get_post_data()->post_excerpt); 461 } 462 $attributes = $item_meta->meta ? $item_meta->display( true, true, '_', ', ' ) : ''; 463 $variation = $product instanceof WC_Product_Variation ? wp_strip_all_tags($product->get_variation_description()) : ''; 464 $short_descr = wp_strip_all_tags( $product->get_post_data()->post_excerpt ); 465 $template = get_option( 'woocommerce_sf_product_description', $this->product_description_template_default ); 466 467 $item_data['description'] = strtr( $template, [ 468 '[ATTRIBUTES]' => $attributes, 469 '[VARIATION]' => $variation, 470 '[SHORT_DESCR]' => $short_descr, 471 '[SKU]' => $product->get_sku(), // this may be different SKU that that above (in case of variable product) 472 ] ); 462 473 463 474 if ( $product->is_on_sale() ) … … 889 900 array( 890 901 'title' => __('Product Description', 'wc-superfaktura'), 891 'id' => 'woocommerce_sf_product_description_visibility', 892 'type' => 'checkbox', 893 'desc' => 'Display a product description.', 894 'default' => 'yes' 902 'desc' => sprintf(__('Available Tags: %s'), '[ATTRIBUTES], [VARIATION], [SHORT_DESCR], [SKU]'), 903 'id' => 'woocommerce_sf_product_description', 904 'css' => 'width:50%; height: 75px;', 905 'default' => $this->product_description_template_default, 906 'type' => 'textarea', 895 907 ), 896 908 array( -
woocommerce-superfaktura/trunk/wc-superfaktura.php
r1424201 r1431417 11 11 * Plugin URI: http://www.platobnebrany.sk/ 12 12 * Description: WooCommerce integrácia služby <a href="http://www.superfaktura.sk/api/">SuperFaktúra.sk</a> Máte s modulom technický problém? Napíšte nám na <a href="mailto:[email protected]">[email protected]</a> 13 * Version: 1.5. 513 * Version: 1.5.6 14 14 * Author: Webikon (Ján Bočínec) 15 15 * Author URI: http://www.webikon.sk
Note: See TracChangeset
for help on using the changeset viewer.