0 */ private function combine_rules_selectors() { // Build an array of selectors along with the JSON-ified styles to make comparisons easier. $selectors_json = array(); foreach ( $this->css_rules as $rule ) { $declarations = $rule->get_declarations()->get_declarations(); ksort( $declarations ); $selectors_json[ $rule->get_selector() ] = wp_json_encode( $declarations ); } // Combine selectors that have the same styles. foreach ( $selectors_json as $selector => $json ) { // Get selectors that use the same styles. $duplicates = array_keys( $selectors_json, $json, true ); // Skip if there are no duplicates. if ( 1 >= count( $duplicates ) ) { continue; } $declarations = $this->css_rules[ $selector ]->get_declarations(); foreach ( $duplicates as $key ) { // Unset the duplicates from the $selectors_json array to avoid looping through them as well. unset( $selectors_json[ $key ] ); // Remove the rules from the rules collection. unset( $this->css_rules[ $key ] ); } // Create a new rule with the combined selectors. $duplicate_selectors = implode( ',', $duplicates ); $this->css_rules[ $duplicate_selectors ] = new WP_Style_Engine_CSS_Rule( $duplicate_selectors, $declarations ); } } }
Fatal error: Uncaught Automattic\WooCommerce\Internal\DependencyManagement\ContainerException: Attempt to get an instance of class 'Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog\POSProductVisibilitySync', which doesn't exist. in /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/RuntimeContainer.php:105 Stack trace: #0 /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/RuntimeContainer.php(78): Automattic\WooCommerce\Internal\DependencyManagement\RuntimeContainer->get_core('Automattic\\WooC...', Array) #1 /htdocs/wp-content/plugins/woocommerce/src/Container.php(68): Automattic\WooCommerce\Internal\DependencyManagement\RuntimeContainer->get('Automattic\\WooC...') #2 /htdocs/wp-content/plugins/woocommerce/src/Internal/ProductFeed/Integrations/POSCatalog/POSIntegration.php(76): Automattic\WooCommerce\Container->get('Automattic\\WooC...') #3 /htdocs/wp-content/plugins/woocommerce/src/Internal/ProductFeed/ProductFeed.php(68): Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog\POSIntegration->register_hooks() #4 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(407): Automattic\WooCommerce\Internal\ProductFeed\ProductFeed->register() #5 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(268): WooCommerce->init_hooks() #6 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(169): WooCommerce->__construct() #7 /htdocs/wp-content/plugins/woocommerce/woocommerce.php(47): WooCommerce::instance() #8 /htdocs/wp-content/plugins/woocommerce/woocommerce.php(62): WC() #9 /htdocs/wp-settings.php(560): include_once('/htdocs/wp-cont...') #10 /htdocs/wp-config.php(98): require_once('/htdocs/wp-sett...') #11 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #12 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #13 /htdocs/index.php(17): require('/htdocs/wp-blog...') #14 {main} thrown in /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/RuntimeContainer.php on line 105