Plugin Directory

Changeset 1580881


Ignore:
Timestamp:
01/24/2017 08:56:31 AM (9 years ago)
Author:
channelengine
Message:

Keep newlines when replacing html

Location:
channelengine-woocommerce/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • channelengine-woocommerce/trunk/admin/class-channel-engine-product-feed.php

    r1577352 r1580881  
    3434
    3535        $this->product_validation = $product_validation;
     36    }
     37
     38    private function br2nl($string) {
     39        return preg_replace('/<br\s*?\/?>|<\/p>/i', "\r\n", $string);
    3640    }
    3741
     
    7175            $product['url'] = $wcProduct->get_permalink();
    7276            $product['name'] = $item->post_title;
    73             $product['description'] = strip_tags($item->post_content);
     77            $product['description'] = strip_tags($this->br2nl($item->post_content));
    7478            $product['stock'] = $wcProduct->get_stock_quantity();
    7579            $product['gtin'] = $this->get($meta, $pr.'_gtin');
  • channelengine-woocommerce/trunk/woocommerce-channel-engine.php

    r1577953 r1580881  
    44Plugin URI: http://channelengine.net
    55Description: ChannelEngine plugin for WooCommerce
    6 Version: 1.3
     6Version: 1.4
    77Author: ChannelEngine
    88Author URI: http://channelengine.net
Note: See TracChangeset for help on using the changeset viewer.