Trong Seri hướng dẫn về WooCommerce dành cho người thiết kế Theme WordPress bán hàng chuyên nghiệp, ở bài chia sẻ này. Zubi Cloud hướng dẫn bạn Cách làm sao để ẩn nút “Thêm vào giỏ” hoặc “Add to Cart” nếu sản phẩm đó đã được mua trong WooCommerce.
Hướng dẫn cách ẩn nút “Thêm vào giỏ” hoặc “Add to Cart” nếu sản phẩm đó đã được mua trong WooCommerce như sau:
Chèn đoạn code bên dưới vài file functions.php trong theme wordpress bạn đang sử dụng
/** Zubi Cloud help - Ẩn Thêm vào giỏ hàng nếu đã mua */ add_filter( 'woocommerce_is_purchasable', 'bbloomer_hide_add_cart_if_already_purchased', 9999, 2 ); function bbloomer_hide_add_cart_if_already_purchased( $is_purchasable, $product ) { if ( wc_customer_bought_product( '', get_current_user_id(), $product->get_id() ) ) { $is_purchasable = false; } return $is_purchasable; }
Và đây là thành quả, hãy xem có gì hay nào
Đoạn mã này sẽ:
- Ẩn hoàn toàn Thêm vào giỏ hàng trên trang sản phẩm duy nhất
- Đổi tên mục Thêm vào giỏ hàng trên Trang cửa hàng thành “Đọc thêm”
- Không thể thêm mặt hàng vào giỏ hàng ngay cả khi có URL – nó sẽ hiển thị màu đỏ “Rất tiếc, không thể mua sản phẩm này”. lỗi trong trường hợp như vậy
It’s remarkable for me to have a site, which is useful designed for my knowledge.
thanks admin
After I initially commented I seem to have clicked on the -Notify me when new comments are added- checkbox and
from now on each time a comment is added I receive 4 emails with the same comment.
Perhaps there is an easy method you are able to remove me from
that service? Thank you!
My brother recommended I would possibly like this blog.
He was entirely right. This publish truly made my day.
You can not believe simply how much time I had spent for
this information! Thanks!
Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your
point. You clearly know what youre talking about, why waste your intelligence on just
posting videos to your site when you could be giving us
something informative to read?
Helpful information. Lucky me I discovered your website by chance, and I’m stunned why this twist
of fate didn’t took place in advance! I bookmarked it.
A motivating discussion is definitely worth comment. I think that you need to write more about this topic, it might not be a taboo subject but typically people do not talk about
such issues. To the next! Kind regards!!
For the reason that the admin of this website is working, no uncertainty very quickly it will be renowned, due to its feature
contents.
Way cool! Some extremely valid points! I appreciate you penning this write-up and the
rest of the site is extremely good.
Hi! Do you use Twitter? I’d like to follow you if that would be ok.
I’m definitely enjoying your blog and look forward to new posts.
When I initially commented I seem to have clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get four emails with the same comment.
Is there a way you are able to remove me from that service?
Thanks!
Very good article! We are linking to this particularly
great content on our website. Keep up the great writing.
animehangover.com
이것만 의지하면 천군중에서 사람을 구할 수 있단 말인가?
скачать казино brillx
https://brillx-kazino.com
Наше казино стремится предложить лучший игровой опыт для всех игроков, и поэтому мы предлагаем возможность играть как бесплатно, так и на деньги. Если вы новичок и хотите потренироваться перед серьезной игрой, то вас приятно удивят бесплатные режимы игр. Они помогут вам разработать стратегии и привыкнуть к особенностям каждого игрового автомата.Играя на Brillx Казино, вы можете быть уверены в честности и безопасности своих данных. Мы используем передовые технологии для защиты информации наших игроков, так что вы можете сосредоточиться исключительно на игре и наслаждаться процессом без каких-либо сомнений или опасений.
brillx официальный сайт играть онлайн
https://brillx-kazino.com
Так что не упустите свой шанс вступить в мир Brillx Казино! Играйте онлайн бесплатно и на деньги в 2023 году, окунувшись в море невероятных эмоций и неожиданных поворотов. Brillx – это не просто игровые аппараты, это источник вдохновения и увлечения. Поднимите ставки и дайте себе шанс на большую победу вместе с нами!Играя на Brillx Казино, вы можете быть уверены в честности и безопасности своих данных. Мы используем передовые технологии для защиты информации наших игроков, так что вы можете сосредоточиться исключительно на игре и наслаждаться процессом без каких-либо сомнений или опасений.
nice content!nice history!! boba 😀
nice content!nice history!! boba 😀
nice content!nice history!! boba 😀
wow, amazing
[url=https://teplica-teplourala.ru]Теплицы новгород купить.[/url]
[url=https://teplica-teplourala.ru]Прямостенные теплицы от производителя цены.[/url]
[url=https://teplica-teplourala.ru]Теплицы прямостенные от производителя.[/url]
wow, amazing
nice content!nice history!! boba 😀
wow, amazing
nice content!nice history!! boba 😀
nice content!nice history!! boba 😀
wow, amazing
nice content!nice history!! boba 😀
wow, amazing
wow, amazing
nice content!nice history!! boba 😀
wow, amazing
wow, amazing
wow, amazing
nice content!nice history!! boba 😀
nice content!nice history!! boba 😀
wow, amazing
nice content!nice history!! boba 😀
wow, amazing
nice content!nice history!! boba 😀
wow, amazing
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
naturally like your web site however you need to take a look at the spelling on several of your posts. A number of them are rife with spelling problems and I find it very bothersome to tell the truth on the other hand I will surely come again again.