Support » Plugin: Simple Catalog for WooCommerce » Ignore selection. The price is always not shown.

  • Resolved mrduk

    (@mrduk)


    /**
    * Hide the Add to Cart button on the single product page
    */
    public function scw_single_product_hide_cart_buttons() {
    global $product;

    if( $product->is_type(‘variable’) ) {
    // Remove price on Variation
    —–> remove_action( ‘woocommerce_single_variation’, ‘woocommerce_single_variation’, 10);

    // Remove Add to Cart on Variation
    ——> remove_action( ‘woocommerce_single_variation’, ‘woocommerce_single_variation_add_to_cart_button’, 20 );
    }
    else {
    remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 30 );
    }
    }

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Ignore selection. The price is always not shown.’ is closed to new replies.