Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Why print_script_block_data used on every page?

$
0
0

Replies: 0

Hi!

Recently I noticed that on every page the script “var wc_product_block_data = JSON.parse (decodeURIComponent (“.

This script is output by the function print_script_block_data from woocommerce\packages\woocommerce-blocks\src\Assets.php.

Why is this script needed?

The problem is that I have a lot of categories and the script is just huge!

Just for example, I copied the script code and saved it in a text file. File size over 500 kilobytes! Half a megabyte of incomprehensible code!)))


Viewing all articles
Browse latest Browse all 59525

Trending Articles