Created
August 25, 2022 06:36
-
-
Save Auke1810/082d74e42c158f37815832ba2d7b8c0f to your computer and use it in GitHub Desktop.
Strip from description attributes in the woocommerce product feed manager from wpmarketingrobot.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function alter_feed_item( $attributes, $feed_id, $product_id ) { | |
// Strip from description attributes | |
$attributes['description'] = str_replace(' ', ' ', $attributes['description']); | |
// IMPORTANT! Always return the $attributes | |
return $attributes; | |
} | |
add_filter( 'wppfm_feed_item_value', 'alter_feed_item', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment