I found 2 code snippets on the support forum that don’t work!
Although the spinning disappeared, it seemed to ignore the translation directly!
`add_action( ‘woocommerce_before_template_part’, function () {
global $product;
if ( wp_is_json_request() && ! $product ) {
$random_product = new WP_Query(
array(
‘posts_per_page’ => ‘1’,
‘post_type’ => ‘product’,
)
);
while ( $random_product->have_posts() ) {
$random_product->the_post();
$product_id = get_the_ID();
}
wp_reset_postdata();
$product = wc_get_product( $product_id) ;
}
} );
add_action(‘init’, function () {
if ( ! empty( $_SERVER[‘REQUEST_URI’] ) && false !== strpos( $_SERVER[‘REQUEST_URI’], trailingslashit( rest_get_url_prefix() ) ) && function_exists( ‘wc_load_cart’ ) && ! function_exists( ‘wc_print_notices’ ) ) {
wc_load_cart();
}
}, 1000);