woocommerce attributes not showing on front end - wordpress

I have setup a Woocommerce store with hundreds of variable products (months ago). Everything has been working great with product variations/attributes so far, but today I got a message saying that customers are unable to pick a size for some of our products.
So, I have been looking into this, but I do not see why this is not working as intended...
I have set the attributes correctly on the back-end, I know this because it has been working as intended for the last 6+ months. I have also looked at the attributes & variations settings for these products, and they are all still set correctly.
Then, I double-checked to make sure the variation still had a price set, which it does.
Then, I checked the front-end of the site, and sure enough, the "size" attributes no longer show any options.
Any thoughts on why this might be? I have looked around stackoverflow a bit already... and the only thing I have found that I haven't tried yet, is: disabling all the plugins and reverting the site's theme to a default theme... I am really trying to avoid going down that road...
Sample URL (manually set product "Size" attributes on product page back-end):
https://www.worldequestrianbrands.com/product/contour-all-purpose-pad-with-bare-flaps/
Any/all help is greatly appreciated!
WordPress: 4.7.4 - WooCommerce: 3.0.5
Update #1:
Follow up:
After investigation, and an email from a fellow stackoverflow user, I have narrowed this down to a plugin version incompatibility with WooCommerce 3.0.5. Rolling back to WC 3.0.4 restored all the products' custom attributes to the front-end of the site. I am not sure what or why this issue happened, all I know is that rolling back WC was as a temporary workaround.
More Info:
When I first posted this issue on stackoverflow, I was running WC 3.0.5. When running that version, this was my experience:
I have Variable Products setup with multiple Custom Attributes (set for each product, not through the WooCommerce > Attributes settings admin-sidebar feature of WC).
If I went to edit a Variable Product with custom attributes, all of custom attributes showed up fine on the back-end, but only 1 of the custom attributes would not show any options on the front-end (e.g. "size" attribute).
Looking again at the back-end of the product, the size attribute is listed, with variations, and a set price.
I tried clicking "Update" on a product, just to see what would happen, and when the back-end page reloaded, the custom attribute I set was gone (e.g. "size").
So, I figured it wasn't loading that Custom Attribute for some reason, so I went to the proper: WooCommerce > Attributes, and set the "size" attributes there
Then went back to the variable products, and added the newly set "size" attributes, from the proper WooCommerce > Attributes that I setup
Clicked "Update" to commit the changes, and there we go, now the "size" attribute shows up correctly on the front-end
I manually updated over 100+ products this way
A fellow stackoverflow user emailed me and mentioned he had the same issue, but rolling back to WC 3.0.4 worked for him, as a "workaround"
I rolled WC back from 3.0.5 > 3.0.4, and boom, all the Custom Attributes we have set are now loading on the front-end of each product, as intended.
So, after all of that... I am still not sure exactly what is causing the issue, all I know is rolling back WC seems to allow certain Custom Attributes to be displayed again, on the front-end.
If I find out anything else, I'll be sure to update here!
Thank you again for any/all help with this! I am glad this 'workaround' is possible, for now, but the root of the issue is still unresolved.
I have not looked at any PHP or any other server logs yet, due to limited time, but I am happy to report any follow up info I can - or the actual issue AND solution! :)
Any other insights are greatly appreciated! I am still curious why this is happening...
Cheers!
Update #2:
This seems to be a known issue with WooCommerce 3.0.5, as stated on github
"We've identified the cause of the errors. This issue happens when you have a custom attribute with the same name as a global attribute. We're working on a fix now."

Related

Can't access to product's reviews in WooCommerce when using Gutenberg as editor

I know that Gutenberg isn't supported on Woocommerce, but I'm trying it anyway and so far is quite good. Im doing it by:
function wplook_activate_gutenberg_products($can_edit, $post_type){
if($post_type == 'product'){
$can_edit = true;
}
return $can_edit;
}
add_filter('use_block_editor_for_post_type', 'wplook_activate_gutenberg_products', 10, 2);
What I notice that there is error when trying add some of the Woo blocks in products, so I decide to disable Woo blocks on products to avoid it. Works ok now.
But in backend and can't access to reviews. I see only comments section but this not working at all. Does anybody dealing with that somehow?
I found this thread trying to find a solution to your last part too.
When I have Gutenberg active on products, even with reviews enabled in WooCommerce settings, when I go to:
Product Data
Advanced
and try and toggle the "Enable Reviews" option
When I save and then refresh the change doesn't seem to take so I am unable to turn reviews on if they are currently off or turn them off if they are currently on.
I have tried to test all of the other options and checkboxes like virtual and downloadable and they all seem to save fine it just seems to be this one setting that doesn't get saved.
I am keeping note of everything I find on the matter and if I manage to find a solution I will come back to share. I'm not sure if it will help with your other issue though which I haven't faced.

NextScripts SNAP : not using the permalink in wordpress?

This is in a way a followup of this question : Jetpack Publicize: Sharing only on Twitter for a category
I am currently working on a website in which one of the category only serves as a way to curate news on the net and then, share it on the front page and on Twitter.
The post itself is empty, I use a custom field to receive the URL from the user, grab a few things from the target website, update the permalink and save. Upon saving, SNAP publishes the post on Twitter.
My issue is that it is not using the permalink but the url of the post itself (which is absolutely empty). Having a look into the plugin's code, I saw that it was using post metas (most notably urlToUse, snap_MYURL) but couldn't determine if it was a priority issue or something else.
I also try to adjust my code to set these meta values to the url I want, to no avail.
Is there a way I could set my custom functions or the SNAP plugin so that the permalink is used ?
No answer after a week, neither here nor from SNAP's support. No problem.
The ugly patch I used :
Jetpack Publicize for all the Twitter updates
SNAP for the Facebook ones thanks to their ability of posting based on a specific category
It's bloated and I'd love to understand but, sometime, you have to ship

Woo commerce - variable product prices missing from WP

hoping for some help.
We use the following - Wordpress/ woo commerce /wcvendors pro. Prices for variable products are disappearing from wp engine view despite being in the product variation information. It doesn't impact every product on our site but a fair few. How it occurs is, the price is disappearing when you go in and edit the product. If we quick edit the product the price reappears. But it will dissapears again if we use the edit button. Initially the problem started because under the "Products" and "Inventory" We had checked the following setting: "Hide out of stock items from the catalog". Now this button is not ticked but it is still causing us issues.
It seems you have an error on the product page which cause the price not to be saved.
There can be some reasons, here are two I see occasioanlly:
PHP error is caused during the save, and therefore the data is lost. WordPress and WooCommerce works flawlessly together, so the first suspects are other plugins and your theme. Try first to turn off all your plugins and switch to another theme to see if this happens again. If not try to activate your theme, and recheck, and then the plugins one after the other, and check after each activation, until you find the one makes the problem.
Too many data is being saved at one time. It can be too many variations or too many custom fields. This can be fixed by changing some PHP settings. Please have a look here especially under the WPEngine note, and also check this plugin.

Woocommerce Price Not Showing

I think this is a weird situation. Usually Woocommerce is a normal plugin, when I install it and Voila Ecommerce ready to use. But, when I install it in my staging server, the price never appear.
I try to debug, I print out all value on $product variable. All information I need is placed in there except "price", but regular price appear. If I put "Sale Price", the price appear, ofcourse 2 prices appear, regular and sale. So the function "$product->get_price_html()" was empty. I have tried to downgrade the Woocommerce version, the result is the same. Unlucky me. You can see it on dev.skripptek.com/kulkulfarm/shop
One problem more, if I use variations, it couldn't saved.
product dashboard
I put sale price at above, and below is null.
I have to googled it, and no one have my problems. It make me stressed and crazy. Is anyone have some problem with me? Please help, it's been 3 days.
Additional information
I already debugged Woocommerce. The "price" is never filled with value when I fill the regular price in DB, but when I fill sale price, the "price" filled automaticly with value.
When I try edit product with quick edit, price is also filled with value but not if I edit directly in edit post. Maybe someone in Automattic can help me with this?
Solved
I update this description, it is solved actually see and expand the comments below. Not sure why it happen, it is just happened in my staging server but in production working fine. Maybe need reinstall the WordPress installation or not compatible with apache version or mysql version.
I'm having a similar issue. It's been working fine with the current child theme (Dazzling) until towards the end of last year.
Products with variants however are behaving correctly. It's the simple product.. if I enter a new product and regular price, it doesn't show "add to cart" and on the previous multiple product listing screen it shows as "read more". If I put a sale price in, it works.
Also, If I remove/clear the sale price that was saved previously and save again, it still has the price I cleared. It's as if wordpress/woocommerce isn't updating the product on this section. All other areas, updating seems fine.
I did a temporary workaround, until this is resolved, by adding a sale price and scheduling it in the past.
I'm seeing a few posts about this issue and starting to suspect it an woocommerce/wordpress issue after an update? I can't be certain though.

Why is my Wordpress plugin trying to update as someone else's?

I'm writing a plugin, based on someone else's tutorial.. I've been changing parts of it as I'm building it, such as the name, names of functions and so forth. The basics of the plugin work as expected, and it shows up in the plugin manager UI. However, when I activate it, it shows my custom metadata (plugin name, version, etc), but it INCORRECTLY displays and "Update this plugin" message of someone else's plugin. Now this plugin appears not to be related to the tutorial maker (which was my first suspicion).. it seems not to be directly related to the plugin name, folder name, or filenames.. but I really can't seem to control it – other than remove the whole metadata section, which seems illogical.
What is linking my plugin to someone else's plugin, or otherwise causing it to wrongly identify?
Thanks in advance
The plugin section gathers info from their online repo, so if you have named it to something that's already there, it will pull through that data.
Just give it a unique name:
/*
Plugin Name: My Unique Plugin
*/

Resources