Add ajax_add_to_cart class to Add to cart element

Please, consider add ajax_add_to_cart class to Add to cart element.
Two popular plugins: GTM4WP and GTM Kit use this class to trigger add_to_cart dataLayer event after click.

In this moment it is impossible add this class into editor.
I create my own loop to display products on archive pages.
I added element “Add to cart”.

image

I added ajax_add_to_cart class to this element.

image

But class is added to parent container.
To trigger event, the class should be on html tag A[href]

A[href] tag contains class brx_ajax_add_to_cart
I think it will be simple job to add another class “ajax_add_to_cart”.

In this moment I add this class using javascript and everything works fine.
But, a better solution will be add this class directly.