وردپرس

WooCommerce “Ship to different address” checkbox bug + Solution


Hi, I just came across this bug from an older support question:

https://wordpress.org/support/topic/%cf%80%cf%81%cf%8c%ce%b2%ce%bb%ce%b7%ce%bc%ce%b1-%cf%83%ce%b5-woocommerce/

When I click the Ship to different address checkbox, it immediately unchecks itself and I can’t use the shipping fields.

There was a fix implemented indeed, but only for the jQuery mode. I use the JavaScript mode and had the same problem, because I had the h3 selector in my “Include selectors” field.

This is how I fixed the problem.

I removed the CSS text-transform: uppercase from the h3 element (it was added from my theme) and applied it again but only in the inner span tag where the actual text exists. I also added in the Include selectors the #ship-to-different-address span so it gets targeted by the plugin. So now the JS script to remove the accents doesn’t target the whole h3 wrapper, but only the span, and everything works fine.

h3#ship-to-different-address {
	text-transform: unset;
}

h3#ship-to-different-address span {
	text-transform: uppercase;
}

این خبر را در ایران وب سازان مرجع وب و فناوری دنبال کنید

مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد

منبع: انجمن وردپرس

دکمه بازگشت به بالا