`+lo(VhFE`+lo(VpFEZpo(VPPFBP|lo(V`Ftko(VF<lo(VF+poo(VPxFpko(VF<mo(VFko(V@F*lo(VPFmo(V@FGpoo(VP0Fpko(V F<5no(V FHpoo(VPFpko(V0F<5no(V0FH`+lo(VFEZpo(VPPFBP|lo(V`Ftko(V@F<lo(V@F+poo(VPpFpko(VPF<mo(VP`Fko(V@F*lo(V`Fmo(V`FHpmo(VPFtko(VF<lo(VG>SF?o(VI|lo(VI>bbbb0AX0AxVAآ0Aآ0AHcb bdb@0A0Abb=A@1b1b8!/A ݅b/A/AX.A/A@0A0A/A0Ah0A`/A1b02b8!/A ݅b 8A 8A@Oo(V 8Abmute(); wp_send_json_success(); } } P|lo(V`8tko(V8<8no(V8Gp[lo(V8Hp[lo(V8Hp[lo(V8Hp[lo(V8Hp[lo(V@pmP/** * CreateOrderEndpoint constructor. * * @param RequestData $request_data The RequestData object. * @param PurchaseUnitFactory $purchase_unit_factory The PurchaseUnit factory. * @param ShippingPreferenceFactory $shipping_preference_factory The shipping_preference factory. * @param ReturnUrlFactory $return_url_factory The return URL factory. * @param ContactPreferenceFactory $contact_preference_factory The contact_preference factory. * @param ExperienceContextBuilder $experience_context_builder The ExperienceContextBuilder. * @param OrderEndpoint $order_endpoint The OrderEndpoint object. * @param PayerFactory $payer_factory The PayerFactory object. * @param SessionHandler $session_handler The SessionHandler object. * @param Settings $settings The Settings object. * @param EarlyOrderHandler $early_order_handler The EarlyOrderHandler object. * @param bool $registration_needed Whether a new user must be registered during checkout. * @param string $card_billing_data_mode The value of card_billing_data_mode from the settings. * @param bool $early_validation_enabled Whether to execute WC validation of the checkout form. * @param string[] $pay_now_contexts The contexts that should have the Pay Now button. * @param bool $handle_shipping_in_paypal If true, the shipping methods are sent to PayPal allowing the customer to select it inside the popup. * @param bool $server_side_shipping_callback_enabled Whether the server-side shipping callback is enabled (feature flag). * @param string[] $funding_sources_without_redirect The sources that do not cause issues about redirecting (on mobile, ...) and sometimes not returning back. * @param LoggerInterface $logger The $tiny_metadata = array(); } $tiny_image = new Tiny_Image( $settings, $result[ $i ]['ID'], $wp_metadata, $tiny_metadata, $active_sizes, $active_tinify_sizes ); $image_stats = $tiny_image->get_statistics( $active_sizes, $active_tinify_sizes ); $stats['uploaded-images']++; $stats['estimated_credit_use'] += $image_stats['available_uncompressed_sizes']; if ( $conversion_enabled ) { $stats['available-unoptimized-sizes'] += $image_stats['available_unconverted_sizes']; $stats['optimized-image-sizes'] += $image_stats['image_sizes_converted']; $stats['estimated_credit_use'] += $image_stats['available_unconverted_sizes']; } else { $stats['available-unoptimized-sizes'] += $image_stats['available_uncompressed_sizes']; $stats['optimized-image-sizes'] += $image_stats['image_sizes_compressed']; } $stats['optimized-library-size'] += $image_stats['compressed_total_size']; $stats['unoptimized-library-size'] += $image_stats['initial_total_size']; $has_conversions = $image_stats['available_unconverted_sizes'] > 0; $has_compressions = $image_stats['available_uncompressed_sizes'] > 0; $has_optimizations = $has_compressions || ($conversion_enabled && $has_conversions); if ( $has_optimizations ) { $stats['available-for-optimization'][] = array( 'ID' => $result[ $i ]['ID'], 'post_title' => $result[ $i ]['post_title'], ); } }// End for(). return $stats; } }