WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Disable other product / Hide "Add To Cart" after insert 1 product in cart (3 posts)

  1. paanmfr
    Member
    Posted 11 months ago #

    Hi there,

    Need help on setting filter / action to remove or disable "add to cart" after a selected product is added to the cart.

    Theres a series of product.. Product A, Product B, Product C, and other products..

    If either one of these product was added to the cart, the whole store "add to cart" button will be remove or hidden or disable.

    Thank you.

    http://wordpress.org/plugins/woocommerce/

  2. jameskoster
    Member
    Plugin Author

    Posted 11 months ago #

    Hey,

    You can check what is in the cart with $woocommerce->cart->cart_contents. Then remove the add to cart using remove_action() (see woocommerce-hooks.php).

    Thx

  3. paanmfr
    Member
    Posted 11 months ago #

    Thanks Jameskoster

    Functions added and worked.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.