Support Forum » User Profile

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Bug image advanced with woocommerce featured image #28436
    Felipe PereiraFelipe Pereira
    Participant

    Hi,

    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;
    }
    
    in reply to: Bug image advanced with woocommerce featured image #28333
    Felipe PereiraFelipe Pereira
    Participant

    Hi 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/nOuoAoG5

    Second test removing advanced image images created with metabox:
    https://share.getcloudapp.com/xQubG7Yo

    The problem occurs after we save the product with the images added to the gallery created by the metabox.

    in reply to: Bug image advanced with woocommerce featured image #28309
    Felipe PereiraFelipe Pereira
    Participant

    Hi, 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/dcJv5Lny

    in reply to: Bug image advanced with woocommerce featured image #28282
    Felipe PereiraFelipe Pereira
    Participant

    Hi 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.

Viewing 4 posts - 1 through 4 (of 4 total)