Plugin Directory

Changeset 3173023


Ignore:
Timestamp:
10/21/2024 02:55:36 PM (16 months ago)
Author:
adscout
Message:

Modified file export script for feed generator

Location:
adscout
Files:
51 added
3 edited

Legend:

Unmodified
Added
Removed
  • adscout/trunk/README.txt

    r3170103 r3173023  
    44Requires at least: 4.7
    55Tested up to: 6.6
    6 Stable tag: 2.2.5
     6Stable tag: 2.2.6
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4343
    4444== Changelog ==
     45
     46= 2.2.6 =
     47* Modified category separator in product feed generator
    4548
    4649= 2.2.5 =
  • adscout/trunk/adscout.php

    r3170090 r3173023  
    1313 * Plugin URI:        https://adscout.io / http://scoutefy.com
    1414 * Description:       WordPress / WooCommerce integration for AdScout
    15  * Version:           2.2.4
     15 * Version:           2.2.6
    1616 * Author:            AdScout / ux2.dev
    1717 * Author URI:        https://ux2.dev/plugins/adscout
     
    4141 * Start at version 2.0.0 and use SemVer - https://semver.org
    4242 */
    43 define('ADSCOUT_VERSION', '2.2.4');
     43define('ADSCOUT_VERSION', '2.2.6');
    4444
    4545/**
  • adscout/trunk/includes/class-adscout-woocommerce.php

    r3169961 r3173023  
    102102                if (!$wp_filesystem->exists($feed_file)) {
    103103                    $wp_filesystem->put_contents($feed_file, '\xEF\xBB\xBF', 0664);
    104                     $wp_filesystem->put_contents($feed_file, 'product_id,title,link,price,sale_price,image,sku,category', 0664);
     104                    $wp_filesystem->put_contents($feed_file, 'product_id,title,link,price,sale_price,image,sku,category' . PHP_EOL  , 0664);
    105105                }
    106106
     
    115115                        $cat_obj = get_the_terms($product->get_id(), 'product_cat');
    116116                    }
     117
    117118
    118119                    $category_hierarchy = array(); // This will store the category hierarchy strings
     
    140141
    141142                    // Implode the $category_hierarchy array with commas
    142                     $categories = implode(', ', $category_hierarchy);
     143                    $categories = implode('|', $category_hierarchy) . PHP_EOL ;
    143144
    144145                    // Now, $final_category_hierarchy contains the desired category hierarchy for the product, separated by commas
     
    167168
    168169                            $import_data = $wp_filesystem->get_contents($feed_file);
    169                             $import_data .= implode(',', $variation_data).PHP_EOL;
     170                            $import_data .= implode(',', $variation_data);
    170171
    171172                            $wp_filesystem->put_contents($feed_file,$import_data,0664);
     
    185186
    186187                        $import_data = $wp_filesystem->get_contents($feed_file);
    187                         $import_data .= implode(',', $data).PHP_EOL;
     188                        $import_data .= implode(',', $data);
    188189
    189190                        $wp_filesystem->put_contents($feed_file,$import_data,0664);
Note: See TracChangeset for help on using the changeset viewer.