How to Update the Deprecated Order Status page Additional Scripts Used for Affirm?

How to Update the Deprecated Order Status page Additional Scripts Used for Affirm?

specklefarms
Excursionist
38 1 11

Does this code need to be updated? The three are order.id, order.total_price, and order.line_items. I see a few threads in this help forum about the email received back in June 2024 to update the script. 

 

affirm.ui.ready(function(){
	affirm.analytics.trackOrderConfirmed({
	    "orderId": "{{ order.id }}",
	    "total": "{{ order.total_price }}"
	}, [
	   {% for item in order.line_items %}
	   {
		   "productId": "{{ item.sku }}",
		   "quantity": "{{ item.quantity }}",
	   }
	   {% endfor %}
	]);
});
</script>

 

So should I replace one phrase with the other like below?

 

order.id replace with checkout.order_id

order.total_price replace with checkout.order_id.totalprice

order.line_items replace with checkout.order_id.line_items

 

Replies 0 (0)