Current Path : /storage/v11800/romasitenew/public_html/wp-content/plugins/webappick-product-feed-for-woocommerce/V5/Override/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/romasitenew/public_html/wp-content/plugins/webappick-product-feed-for-woocommerce/V5/Override/AdmarktTemplate.php |
<?php
/**
* This class is responsible for all override admarkt template.
*
* @package CTXFeed
*/
namespace CTXFeed\V5\Override;
use CTXFeed\V5\Utility\Config;
/**
* Class AdmarktTemplate
*
* @package CTXFeed
* @subpackage CTXFeed\V5\Override
*/
class AdmarktTemplate {
/**
* AdmarktTemplate class constructor
*/
public function __construct() {
add_filter( 'woo_feed_filter_product_title', array( $this, 'woo_feed_filter_product_title_callback' ), 10, 3 );
}
/**
* Modify Product Title
*
* @param string $title Product title.
* @param object $product Product object.
* @param Config $config Feed config.
*
* @return string
*/
public function woo_feed_filter_product_title_callback( $title, $product, $config ) { // phpcs:ignore
if ( $config->get_feed_file_type() == 'xml' ) {
$title = str_replace( '&', '&', $title );
}
return $title;
}
}