WooCommerce address_2 field option value is hidden - woocommerce

I cannot see billing and shipping address field 2 (billing_address_field_2 and shipping_address_field_2) in checkout page. On debugging further, i found that the option woocommerce_checkout_address_2_field is set to hidden in option table.
On searching further i couldn't find any position in WooCommerce where the option woocommerce_checkout_address_2_field is added or updated.
Hence i assume the option is reset by some other plugin during its lifetime while the option was not reset to its original option value.
Are there any other instances ? Or is my assumption wrong ?

Without knowing more about your setup, my advice is quite generic:
Via my themes customise section (Wordpress > Customise > WooCommerce > Checkout) I have an option to enable/disable address 2.
Could you perhaps have a look in that area for something similar. Let me know if this has helped.

Related

How to set catalog_visibility in basic Woocommerce plugin

we need to set the catalog_visibility field (as named in postman) in woocommerce (basic plugin), but it does not seem to work the way we go about it. In wordpress it is the setting under single product on the right side, just below “published on”.
We use an ERP system to push the products to our woocommerce shop and need to find the correct article attribute (we then connect the ERP field with the woocommerce attribute and magic happens ... normally)
When I check the product with postman, the field we want to set is called catalog_visibility.
We thus created a field in our ERP with the exact values visible/catalog/search/hidden as we see in postman and tried assigning the article attribute catalog_visibility and also _visibility (but I think this one is for the extension plugin also called "Catalog Visibility"). Neither one worked.
Interestingly, we found out, that both of the attributes we tried to use (_visibility and catalog_visibility) are now shown on the shop's product page (as a table) under a tab called “additional information”, with the value we tried to transfer.
In the backend it is pushed in to the product “properties” tab.
So it seem the values are pushed into woocommerce, but not where and how we want them to.
Has anyone any idea, which attribute (the name) we need to use, to set the visibility of the product?
Thanks!

How to force addition of Product B in order to add product A in Drupal 7?

I am looking for an easy way to associate two products with each other on checkout while at the same time forcing the user to create the association if it doesn't exist yet. Basically, a user can by hosting, but in order to complete the checkout, they also need a domain name. I have classes for each, but I am trying to think of ways to solve two problems:
On checkout, display that two products are associated
Force the user to create the association
Any ideas on what I can use to do that?
UPDATE
What I did was:
Created two separate products
If you add the one, it does a check to see if this item has been linked to another product
If not, it takes you to a custom page forcing you to add and assign the other product
This works, but it's not very elegant. Any better suggestions would be much appreciated.
Use Rules to display messages to the user. Use the event on "add to cart", check the type of product, then check to see if the associated product is added to the cart, if not show message saying you also need to add a hosting package and auto redirect them there. Then upon checkout, check to see if one of those products exist, does the other exist in the cart? Throw same message and auto redirect them to the missing one.
You may need to use components with your rules to get the full effect. But that is what I would do.

Woocommerce: how can I show only one or more categories to vendors?

I need to set only one or few categories for each vendor (specific user).
Is it possible? Is there any plugin for this?
Generally it's not good form to use Stack Overflow to find stuff. It's better to look yourself and show what you've done and why it's not working.
That said, I would recommend you get a plugin that lets you create additional user roles. Then you would need to use Catalog Visibility Options to change category visibility on a per-role basis (http://docs.woothemes.com/document/catalog-visibility-options/#section-4).

Wordpress Advanced Custom Fields - Limit A User's Choice To One Option

I have a WordPress website and as part of the news items, the editor can add either an:
internal link OR
external link OR
file
Currently I have this set up as a repeater field with maximum rows set to 1.
Is it possible if say one value has been entered, to prevent another of the values from being filled in.
E.g. I add an internal link and then try to add an external link. A message of some sort is then shown to me to say that only one value can be selected at a time.
I know I can add a description to the field with this information but I want to make it idiot proof so that the user can never add more than one value.
Thanks for your time and help in advance.
I can't write this in comments but celeriko right. Install types plugin there is ability of conditional logic. You can very easy implement of from backend.
Types: http://wp-types.com/
Reagrds

How to remove default dropdown Select option in Wordpress Contact Form Manager plugin

I'm using the Wordpress Contact Form Manager plugin. If I set a dropdown's element Default drop down value to some value that value does appears selected as I've set it. The problem is when I click on the dropdown to expand it, the additional Select option appears as shown on the image, and I can't seem to find where could I customize this. I went through their FAQ and googled but no help.
As it seems the option to edit this really doesn't exist via the plugin admin panel and in order to remove the additional Select option you have to edit the create-contact-form.php starting on line 1006 and comment the code out:
if($formElementDetail->client_view_multi_select_drop_down != 1){
//$replace = $replace.'<option value="">Select</option>';
}
You can of course comment (or remove) the whole if case. Hope this will help someone.

Resources