No button text because of alter_add_to_cart_button
-
hey,
in your functionalter_add_to_cart_button
of theYITH_WCWL_UI
class you get the option value of the button text using this line:
$label_option = get_option( 'yith_wcwl_add_to_cart_text' );
unfortunately if you did NOT change the button text in the settings, there is no such option, and because you don’t provide any default value, all of the “add-to-cart” buttons are not showing or, to be more precisely, just showing the empty a tag (because the return value of the line above is always
false
)I checked the database and when adding a different add to cart setting the corresponding option will be set, if you change the button text to the default text all the option will be deleted. so this might be fine, if you just use the default using php then, but removing the option and dont set a default seems wrong to me.
And some additional information:
– i tested it with a fresh installation of wordpress 5.3, woocommerce 3.8.0, YITH WooCommerce Wishlist 2.2.16
– i checked the behaviour in different default themes
– i disabled all other plugins
…
- The topic ‘No button text because of alter_add_to_cart_button’ is closed to new replies.