Applies if `prettify` is `true`. Default 0. * @return string The CSS declarations. */ public function get_declarations_string( $should_prettify = false, $indent_count = 0 ) { $declarations_array = $this->get_declarations(); $declarations_output = ''; $indent = $should_prettify ? str_repeat( "\t", $indent_count ) : ''; $suffix = $should_prettify ? ' ' : ''; $suffix = $should_prettify && $indent_count > 0 ? "\n" : $suffix; $spacer = $should_prettify ? ' ' : ''; foreach ( $declarations_array as $property => $value ) { $filtered_declaration = static::filter_declaration( $property, $value, $spacer ); if ( $filtered_declaration ) { $declarations_output .= "{$indent}{$filtered_declaration};$suffix"; } } return rtrim( $declarations_output ); } /** * Sanitizes property names. * * @since 6.1.0 * * @param string $property The CSS property. * @return string The sanitized property name. */ protected function sanitize_property( $property ) { return sanitize_key( $property ); } }
Warning: Class "Automattic\WooCommerce\StoreApi\Formatters" not found in /htdocs/wp-content/plugins/woocommerce/src/StoreApi/deprecated.php on line 73

Fatal error: Uncaught Error: Class "Automattic\WooCommerce\StoreApi\Formatters" not found in /htdocs/wp-content/plugins/woocommerce/src/StoreApi/StoreApi.php:124 Stack trace: #0 /htdocs/wp-content/plugins/woocommerce/src/Blocks/Registry/AbstractDependencyType.php(42): Automattic\WooCommerce\StoreApi\StoreApi::Automattic\WooCommerce\StoreApi\{closure}(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #1 /htdocs/wp-content/plugins/woocommerce/src/Blocks/Registry/SharedType.php(28): Automattic\WooCommerce\Blocks\Registry\AbstractDependencyType->resolve_value(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #2 /htdocs/wp-content/plugins/woocommerce/src/Blocks/Registry/Container.php(96): Automattic\WooCommerce\Blocks\Registry\SharedType->get(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #3 /htdocs/wp-content/plugins/woocommerce/src/StoreApi/StoreApi.php(117): Automattic\WooCommerce\Blocks\Registry\Container->get('Automattic\\WooC...') #4 /htdocs/wp-content/plugins/woocommerce/src/Blocks/Registry/AbstractDependencyType.php(42): Automattic\WooCommerce\StoreApi\StoreApi::Automattic\WooCommerce\StoreApi\{closure}(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #5 /htdocs/wp-content/plugins/woocommerce/src/Blocks/Registry/SharedType.php(28): Automattic\WooCommerce\Blocks\Registry\AbstractDependencyType->resolve_value(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #6 /htdocs/wp-content/plugins/woocommerce/src/Blocks/Registry/Container.php(96): Automattic\WooCommerce\Blocks\Registry\SharedType->get(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #7 /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ServiceProviders/OrderAttributionServiceProvider.php(48): Automattic\WooCommerce\Blocks\Registry\Container->get('Automattic\\WooC...') #8 /htdocs/wp-content/plugins/woocommerce/lib/packages/League/Container/ServiceProvider/ServiceProviderAggregate.php(102): Automattic\WooCommerce\Internal\DependencyManagement\ServiceProviders\OrderAttributionServiceProvider->register() #9 /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ExtendedContainer.php(172): Automattic\WooCommerce\Vendor\League\Container\ServiceProvider\ServiceProviderAggregate->register('Automattic\\WooC...') #10 /htdocs/wp-content/plugins/woocommerce/src/Container.php(124): Automattic\WooCommerce\Internal\DependencyManagement\ExtendedContainer->get('Automattic\\WooC...') #11 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(341): Automattic\WooCommerce\Container->get('Automattic\\WooC...') #12 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(240): WooCommerce->init_hooks() #13 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(158): WooCommerce->__construct() #14 /htdocs/wp-content/plugins/woocommerce/woocommerce.php(47): WooCommerce::instance() #15 /htdocs/wp-content/plugins/woocommerce/woocommerce.php(62): WC() #16 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #17 /htdocs/wp-config.php(86): require_once('/htdocs/wp-sett...') #18 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #19 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #20 /htdocs/index.php(17): require('/htdocs/wp-blog...') #21 {main} thrown in /htdocs/wp-content/plugins/woocommerce/src/StoreApi/StoreApi.php on line 124