*/ private function get_response_for_file( string $filename ): array { $expiration_date = TransientFilesEngine::get_expiration_date( $filename ); $public_url = wc_get_container()->get( TransientFilesEngine::class )->get_public_url( $filename ); return array( 'receipt_url' => $public_url, 'expiration_date' => $expiration_date, ); } /** * Get the accepted arguments for the GET request. * * @return array[] The accepted arguments for the GET request. */ private function get_args_for_get_order_receipt(): array { return array( 'id' => array( 'description' => __( 'Unique identifier of the order.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), ); } /** * Get the schema for both the GET and the POST requests. * * @return array[] */ private function get_schema_for_get_and_post_order_receipt(): array { $schema = $this->get_base_schema(); $schema['properties'] = array( 'receipt_url' => array( 'description' => __( 'Public url of the receipt.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'expiration_date' => array( 'description' => __( 'Expiration date of the receipt, formatted as yyyy-mm-dd.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), ); return $schema; } /** * Get the accepted arguments for the POST request. * * @return array[] */ private function get_args_for_create_order_receipt(): array { return array( 'id' => array( 'description' => __( 'Unique identifier of the order.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'expiration_date' => array( 'description' => __( 'Expiration date formatted as yyyy-mm-dd.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'default' => null, ), 'expiration_days' => array( 'description' => __( 'Number of days to be added to the current date to get the expiration date.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view', 'edit' ), 'readonly' => true, 'default' => 1, ), 'force_new' => array( 'description' => __( 'True to force the creation of a new receipt even if one already exists and has not expired yet.', 'woocommerce' ), 'type' => 'boolean', 'required' => false, 'context' => array( 'view', 'edit' ), 'readonly' => true, 'default' => false, ), ); } }
Warning: class_implements(): Class Automattic\WooCommerce\Internal\ReceiptRendering\ReceiptRenderingRestController does not exist and could not be loaded in /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ServiceProviders/AbstractInterfaceServiceProvider.php on line 61

Warning: foreach() argument must be of type array|object, bool given in /htdocs/wp-content/plugins/woocommerce/src/Internal/DependencyManagement/ServiceProviders/AbstractInterfaceServiceProvider.php on line 61
g($concrete) && class_exists($concrete)) { $concrete = $this->resolveClass($concrete); } if (is_object($concrete)) { $concrete = $this->invokeMethods($concrete); } if (is_string($concrete) && $this->getContainer()->has($concrete)) { $concrete = $this->getContainer()->get($concrete); } $this->resolved = $concrete; return $concrete; } /** * Resolve a callable. * * @param callable $concrete * * @return mixed */ protected function resolveCallable(callable $concrete) { $resolved = $this->resolveArguments($this->arguments); return call_user_func_array($concrete, $resolved); } /** * Resolve a class. * * @param string $concrete * * @return object * * @throws ReflectionException */ protected function resolveClass(string $concrete) { $resolved = $this->resolveArguments($this->arguments); $reflection = new ReflectionClass($concrete); return $reflection->newInstanceArgs($resolved); } /** * Invoke methods on resolved instance. * * @param object $instance * * @return object */ protected function invokeMethods($instance) { foreach ($this->methods as $method) { $args = $this->resolveArguments($method['arguments']); /** @var callable $callable */ $callable = [$instance, $method['method']]; call_user_func_array($callable, $args); } return $instance; } }
Fatal error: Uncaught Error: Class "Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Definition\Definition" not found in /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/Definition/DefinitionAggregate.php:36 Stack trace: #0 /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/Container.php(85): Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Definition\DefinitionAggregate->add('Automattic\\WooC...', Object(Automattic\WooCommerce\GoogleListingsAndAds\Container), true) #1 /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/Container.php(98): Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Container->add('Automattic\\WooC...', Object(Automattic\WooCommerce\GoogleListingsAndAds\Container), true) #2 /htdocs/wp-content/plugins/google-listings-and-ads/src/Container.php(70): Automattic\WooCommerce\GoogleListingsAndAds\Vendor\League\Container\Container->share('Automattic\\WooC...', Object(Automattic\WooCommerce\GoogleListingsAndAds\Container)) #3 /htdocs/wp-content/plugins/google-listings-and-ads/google-listings-and-ads.php(93): Automattic\WooCommerce\GoogleListingsAndAds\Container->__construct() #4 /htdocs/wp-content/plugins/google-listings-and-ads/src/PluginFactory.php(25): woogle_get_container() #5 /htdocs/wp-content/plugins/google-listings-and-ads/google-listings-and-ads.php(72): Automattic\WooCommerce\GoogleListingsAndAds\PluginFactory::instance() #6 /htdocs/wp-includes/class-wp-hook.php(324): {closure}('') #7 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #8 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /htdocs/wp-content/plugins/woocommerce/includes/class-woocommerce.php(218): do_action('woocommerce_loa...') #10 /htdocs/wp-includes/class-wp-hook.php(324): WooCommerce->on_plugins_loaded('') #11 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #12 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #13 /htdocs/wp-settings.php(578): do_action('plugins_loaded') #14 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #15 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #16 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #17 /htdocs/index.php(17): require('/htdocs/wp-blog...') #18 {main} thrown in /htdocs/wp-content/plugins/google-listings-and-ads/vendor/league/container/src/Definition/DefinitionAggregate.php on line 36