How to Check Attribute is used for promo rules by id programmatically Magento 2?

Product Attribute is used to display in Promo Rules for Shopping Cart Discount. It’s based on you, whether attribute wants to display on Promo rule or not.

You can manage/check it from the Manage Attribute section of the Backend of Magento manually but from programmatic way, you need to create additional logic for it.

is_used_for_promo_rules identifies to specific attribute will be used for the Promo discount on the Cart or Checkout page.

Call method from the PHP Class,

Based on the above code, You can verify the given attribute is used for the discount of the cart or not.

Output:
true/false