oont-contents/plugins/webappick-product-feed-for-woocommerce/V5/Tax/TaxFactory.php
2025-03-31 21:42:48 +02:00

24 lines
No EOL
464 B
PHP

<?php
namespace CTXFeed\V5\Tax;
/**
* Class TaxFactory
*
* @package CTXFeed\V5\Tax
* @subpackage CTXFeed\V5\Tax
*/
class TaxFactory {
public static function get( $product, $config ) {
$template = $config->get_feed_template();
$class = "\CTXFeed\V5\Tax\\" . ucfirst( $template ) . "Tax";
if ( class_exists( $class ) ) {
return new Tax( new $class( $product, $config ) );
}
return new Tax( new CustomTax( $product, $config ) );
}
}