Hi folks, I have emailed support but thought I’d ask the community to see if anyone has come across this before.
We’re using a modified version of WooCommerce to allow a customer to order prints from a photo shoot. The photos are essentially a product post type, and are listed in a customised version of the Woo product archive. We want the customer to be able to rate each photo from 1 to 5 using radio buttons. So we made the field, and I’ve created a little plugin to pull in that field into a Woo hook.
The following code has got me nearly there, but there’s one issue and one other thing I’d like it to do:
function photo_rating() {
echo the_field('rating_2');
echo acf_form();
}
along with the <?php acf_form_head(); ?>
code.
What happens now is that each photo is listed in the product archive as normal, plus our radio buttons. As it’s a front facing form there’s also an ‘update’ button underneath each set of radio buttons.
I can click a rating and press update, and the post (the photo product) is updated, which is great. However, when you do press update, it takes you to a blank page (though the page is themed still). With debug mode on I can see these errors:
Warning: Cannot modify header information - headers already sent by (output started at /home/s7media/public_html/test/everythingbetween/wp-includes/functions.php:3897) in /home/s7media/public_html/test/everythingbetween/wp-includes/pluggable.php on line 1167
I’ve looked for white space as usual with this error, removed it, and no luck I’m afraid.
So that’s the first thing.
The other thing is that this would be a long process to press update on each photo (there will be dozens). Is there any way of removing the update button from each post in the archive, and instead having one update button which will update all posts at once?
You can see a bit of a screenshot here:
http://imgur.com/a/NiSM6