The problem with displaying the add to cart button on archives pages
-
Hello.
Before installing your plugin, the “Add to cart” button on product pages was displayed without problems on all types of products. I redefined it in my theme mythemes / woocommerce / loop / add-to-cart.phpAfter installing the plugin, I created a group of fields and assigned it to all products. So, on ordinary products, the button began to be displayed as text even without my prescribed classes.
<a href="//localhost:3000/product/flaer-evro/" data-quantity="1" class="button product_type_simple add_to_cart_button " data-product_id="283" data-product_sku="" aria-label="Добавить "Флаер Евро" в корзину" rel="nofollow">Выбрать ...</a>
At the same time, it is displayed correctly on variable products.
<a href="//localhost:3000/product/evrovizitka-85h55mm-bez-pokrytija/" data-quantity="1" class="button product_type_variable add_to_cart_button cltm-btn-link cltm-product-card__btn" data-product_id="267" data-product_sku="" aria-label="Выбрать опции для "Евровизитка 85х55мм без покрытия"" rel="nofollow"><i class="cltm-icon__cart-add"></i></a>
Conducted an experiment and assigned the created group to a specific variable product and the buttons on regular products returned. If I assign this group for a specific regular product, then its button becomes a regular text without styles, and for a neighboring same regular product it is displayed correctly with styles.
I tried to override using the woocommerce_product_add_to_cart_text filter, but it doesn’t work on all products to which the plugin fields are bound.
What can you advise?
Thank you.
- The topic ‘The problem with displaying the add to cart button on archives pages’ is closed to new replies.