javascript - How to define a class for Woocommerce product attribute depending on the product ID?

I have a script that needs dynamic values based on the product ID.
<script type='text/javascript'>
var ccs_cc_args = ccs_cc_args || []
ccs_cc_args.push(['cpn', 'CPN']); ///Dynamically replace the CPN text
ccs_cc_args.push(['mf', 'MFR_NAME']); //Dynamically replace the MFR_NAME text
ccs_cc_args.push(['pn', 'MPN']); //Dynamically replace the MPN text
ccs_cc_args.push(['market', 'PH']);
(function () {
var o = ccs_cc_args; o.push(['_SKey', '6ad5831c']); o.push(['_ZoneId', 'hp-auto-pp']);
var sc = document.createElement('script'); sc.type = 'text/javascript'; sc.async = true;
sc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'cdn.cnetcontent.com/jsc/h.js';
var n = document.getElementsByTagName('script')[0]; n.parentNode.insertBefore(sc, n);
})();
</script>
I have found a solution wherein the values are replaced with defined classes in the PHP file such as this and replace the value in the script about to the defined class.text
<div class="productboxArticlenumber">MLH82N/A</div>
but I am unable to figure out what class woocommerce product attribute terms are since they return in a table format like this and how I can make it reference to the product ID.
<tr class="woocommerce-product-attributes-item woocommerce-product-attributes-item--attribute_pa_brand">
<th class="woocommerce-product-attributes-item__label">Brand</th>
<td class="woocommerce-product-attributes-item__value"><p>Huawei</p>
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: uncaught mysqli_sql_exception
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.