Support » Plugin: Country Based Restrictions for WooCommerce » Variations – Hide row/dropdown

  • Resolved gjv

    (@garethjohnvaughan)


    The plugin has an option for ‘Variations: Select the attribute used for storing the country to hide it’

    I have setup up a ‘dummy’ attribute to assign to my products which I want hidden, it works fine. The problem is the product page is still showing the label and dropdown for this variation despite ticking the box ‘Visible on the product page’ (which I know only hides it from the information panel)

    Is there a way to remove the dropdown that appears by default by WooCommerce?

Viewing 4 replies - 1 through 4 (of 4 total)
  • gjv

    (@garethjohnvaughan)

    I have found a solution:

    Take a copy of the file ‘woocommerce\templates\single-product\add-to-cart\variable.php’ and add new code (in bold) after line 36:

    <?php foreach ( $attributes as $attribute_name => $options ) : ?>
    <?php if ( $attribute_name != “pa_ATTRIBUTENAME”) { ?>
    … do dropdown ….
    <?php } ?>

    <?php endforeach; ?>

    Plugin Author zorem

    (@zorem)

    Hi,

    We can’t hide the attribute name from the dropdown. it can be used for a different variation.

    Plugin Author zorem

    (@zorem)

    Hi @garethjohnvaughan,

    We have released a new version. so, you can update and go to setting and enable the option of hide Variation Products to hide variation products from the dropdown.

    Thanks 🙂

    gjv

    (@garethjohnvaughan)

    Thank you. I have installed the FREE (Version 2.5.1)and PRO (Version 1.9.0) versions on my development site. I can see the slider toggle option for ‘Hide Variation Products’ on the ‘Country Restrictions’ settings although not on the PRO version (which I am using).

    I’m assuming this update for the FREE plugin was where the change occurred and not on the PRO version?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.