• Resolved bordo

    (@bordo)


    Hello,

    I am trying your plugin and so far it seems to do exatly what I needed!
    Altho i want to ask if it’s possible to hide some more columns, I already found from another post how to hide the SKU column, I also would like to know how to hide the Price column, and if possible also the #ID showing up next to the variations.
    I took a screenshot and marked in yellow what i would like to remove.

    Please let me know if it’s possible.

    https://ibb.co/f1x30tD

    Thanks in advance for your help and time.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Dotstore

    (@dots)

    Hello bordo,

    Thanks for reaching out to us.

    Yes, you can remove the SKU or price using the below filter.

    
    /*************** Start code for unset SKU column on product page ***************/
    function wc_quick_cart_for_multiple_variations_unset_sku( $default_headers ) {
    
        unset( $default_headers['sku'] );
        unset( $default_headers['price'] );
    	return $default_headers;
    }
    add_filter( 'wqcmv_table_headers', 'wc_quick_cart_for_multiple_variations_unset_sku', 20, 3 );
    /*************** End code for unset SKU column on product page ***************/
    

    Please add the above code in your functions.php file and let us know how it works.

    Related to the ID I am unable to see it in our latest plugin version.

    Click here to review the screen after applying the filter how it will look.

    Let me know still if any.

    Thanks,

    Plugin Author Dotstore

    (@dots)

    Hello bordo,

    I hope you are fine and your your query gets resolved from our last reply.

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thanks,

    FYI, I have removed the ID in the display by tweaking the plugin code a bit.

    Go find line 77 in woo-quick-cart-for-multiple-variations/includes/variant_purchase_extended_functions.php

    which looks like:
    $variation_title = $product->get_formatted_name();

    replace it with:
    $variation_title = $product->get_formatted_name();
    $tidied_title = explode(” (#”, $variation_title);
    $variation_title = $tidied_title[0];

    beneath it. That chops away the ID from the variation name.

    webwizardofoz

    (@webwizardofoz)

    Hi there,

    unfrotunatly the syntax didnt work ??
    and my PHP is not that good.

    $variation_title = $product->get_formatted_name();
    $tidied_title = explode(” (#”, $variation_title);
    $variation_title = $tidied_title[0];

    Gives a syntax error o last line saying “unexpected ;”

    webwizardofoz

    (@webwizardofoz)

    This is working (not sure why)

    $variation_title = $product->get_formatted_name();
    $clean_title = explode(” (#”, $variation_title);
    $variation_title = $clean_title[0];

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove some columns’ is closed to new replies.