Support

Account

Home Forums ACF PRO Woocommerce metabox position / users

Solved

Woocommerce metabox position / users

  • Hi,

    I got custom fields on woocommerce product page. It’s additional informations.
    I want them to be displayed after the content in the admin product page.
    For the users already created, no problem :
    'position' => 'acf_after_title',
    is respected.

    But if I create new users, they never can move the content (‘long description’ in woocommerce) after my custom fields.
    For this to work, I need to comment my custom code (which declare custom fields), create these users, and then uncomment my creation code.

    Can someone explain me ?

  • Hi @wax

    Could you please share the code you have so I can test it out on my end?

    I also tested it using the example on the documentation but failed to reproduce the issue. Could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.

    Thanks 🙂

  • Hi,
    I can’t reproduce the problem now, so I think maybe it’s a side effect…

    My code is quite simple :

    if( function_exists('acf_add_local_field_group') ):
    
        // Woocommerce : Product page fields
    
        acf_add_local_field_group(array (
            'key' => 'group_575eadb687a13',
            'title' => 'PRODUCT INFORMATIONS',
            'fields' => array (
                array (
                    'key' => 'field_575eadcca9ddd',
                    'label' => '3 Instagram Photos',
                    'name' => 'three_instagram_photos',
                    'type' => 'gallery',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array (
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'min' => '',
                    'max' => 3,
                    'preview_size' => 'medium',
                    'insert' => 'append',
                    'library' => 'all',
                    'min_width' => '',
                    'min_height' => '',
                    'min_size' => '',
                    'max_width' => '',
                    'max_height' => '',
                    'max_size' => '',
                    'mime_types' => '',
                ),
                array (
                    'key' => 'field_57682747afc89',
                    'label' => 'External video',
                    'name' => 'external_video',
                    'type' => 'oembed',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array (
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'width' => '',
                    'height' => '',
                ),
                array (
                    'key' => 'field_57714db3280c7',
                    'label' => 'More description',
                    'name' => 'more_description',
                    'type' => 'wysiwyg',
                    'instructions' => '',
                    'required' => 0,
                    'conditional_logic' => 0,
                    'wrapper' => array (
                        'width' => '',
                        'class' => '',
                        'id' => '',
                    ),
                    'default_value' => '',
                    'tabs' => 'all',
                    'toolbar' => 'full',
                    'media_upload' => 1,
                ),
            ),
            'location' => array (
                array (
                    array (
                        'param' => 'post_type',
                        'operator' => '==',
                        'value' => 'product',
                    ),
                ),
            ),
            'menu_order' => 0,
            'position' => 'acf_after_title',
            'style' => 'default',
            'label_placement' => 'top',
            'instruction_placement' => 'label',
            'hide_on_screen' => '',
            'active' => 1,
            'description' => '',
        ));
    	...
  • Hi @wax

    So the issue is resolved by itself? Maybe there was a caching issue on your site. If the issue occurs again, just let me know. Also, you can copy your full code in Github Gist here: https://gist.github.com/.

    Thanks 🙂

  • Yes. I was waiting because sometimes a problem come back again but it seems to be resolved…
    I know about github, I need to find time to study all of this (github) cause I still work the old way 🙂

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

You must be logged in to reply to this topic.