Home / Why ISO 4217 is Used for Google, Facebook, and Bing in XML Feeds (snippet 3)
Duplicate Snippet

Embed Snippet on Your Site

Why ISO 4217 is Used for Google, Facebook, and Bing in XML Feeds (snippet 3)

First is to add this snippet so all your feed/templates will following the your preferred decimal and thousands separator

<10
Code Preview
php
<?php
// Force localization for all feeds
add_filter('adt_product_feed_localize_price_args', function($args) {
    $args['decimal_separator'] = '.';
    $args['thousand_separator'] = ',';
    return $args;
});
add_filter('adt_pfp_localize_price_iso4217_feeds', function($feeds) {
    // Remove all Google feeds from ISO4217 formatting
    return array_filter($feeds, function($feed) {
        return strpos($feed, 'google_') !== 0;
    });
});

Comments

Add a Comment