Forum Replies Created
-
AuthorPosts
-
Felipe Pereira
ParticipantHi,
I discovered the conflict, I was using ACF to create personalized fields for users, photographers and products in the attachments and that was what was causing conflict.
Thanks for your help was lost before, for anyone who has the same problem follows solution used with metabox to replace the ACF plugins.
<?php add_filter( 'rwmb_meta_boxes', 'metabox_attachment_photographer_register_meta_boxes' ); function metabox_attachment_photographer_register_meta_boxes( $meta_boxes ) { $meta_boxes[] = [ 'title' => esc_html__( 'Fotográfo', 'decostore' ), 'id' => 'attachment_photographer', 'context' => 'normal', 'post_types' => 'attachment', 'media_modal' => true, 'fields' => [ [ 'type' => 'user', 'name' => esc_html__( 'Fotográfo', 'decostore' ), 'id' => 'attachment_photographer', 'field_type' => 'select', 'query_args' => [ 'role' => 'photographer', 'order' => 'ASC', 'orderby' => 'title', ], ], ], ]; return $meta_boxes; }Felipe Pereira
ParticipantHi Long Nguyen,
After saving or updating the product, did you try to remove or change the featured image of the product?
First test with a product with several images added in the galleries created with metabox:
https://share.getcloudapp.com/nOuoAoG5Second test removing advanced image images created with metabox:
https://share.getcloudapp.com/xQubG7YoThe problem occurs after we save the product with the images added to the gallery created by the metabox.
Felipe Pereira
ParticipantHi, Long Nguyen, of course I can.
It is a long code because we have several fields, from attachments to fields with texts and complementary information.Thanks,
https://pastebin.com/dcJv5LnyFelipe Pereira
ParticipantHi Long Nguyen.
Thanks for your feedback, but I'm not really trying to replace the product's featured image on woocommerce. I added a gallery with multiple images with the metabox, they are complementary images to the product, and when adding an image to this gallery there is an error that I can no longer change the featured image of the product (official of woocommerce). It is only possible to change the product image when I remove 100% of the images from the gallery created with the metabox. -
AuthorPosts