• Hello Guys!

    I have a problem, with “select option” button (Woocommerce).

    I have 3pcs variable product, and I used this snippet to change “select option” button text.:

    // Change button text on WooCommerce Shop pages
    add_filter( 'woocommerce_product_add_to_cart_text', 'woocustomizer_edit_shop_button_text' );
    
    function woocustomizer_edit_shop_button_text() {
        global $product;
        $product_type = $product->get_type(); // Get the Product Type
    	
        // Change text depending on Product type
        switch ( $product_type ) {
            case "variable":
                return __( 'Megnézem!', 'woocommerce' );
                break;
            case "grouped":
                return __( 'Megnézem!', 'woocommerce' );
                break;
            case "external":
                // Button label is added when editing the product
                return esc_html( $product->get_button_text() );
                break;
            default:
                return __( 'Megnézem!', 'woocommerce' );
        }
    }

    As you see in this picture, the variable products have not price in the admin, only If I open them… https://ibb.co/XDKHPxv

    How can I solve this problem, and how can I change the “select options” button!? ??
    I tried the “Woocommerce costumizer” plugin ….but its not helped ??

    I would like to see this: https://ibb.co/wWwYYGP
    I dont know how can I set this, to show product price range everywhere in my site.
    And of course change the “select options” button text also important ! ??

    Can you give me any advice?
    Thank you

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Variable product button and price range’ is closed to new replies.