• I’m trying to update a products acf fields using the plugin and an external python code. My endpoint is acf/v3/product/676, and I am trying to post the following:
    {‘acf’: {‘finish’: ‘Sanded and Polished’,
    ‘slice_number’: ’21-001-03′,
    ‘stamp’: None,
    ‘weight_ozt’: ‘51.71’}}
    I’ve tried posting other things, but always get the response:
    {‘code’: ‘rest_forbidden’,
    ‘data’: {‘status’: 401},
    ‘message’: ‘Sorry, you are not allowed to do that.’}
    I tried modifying the plug in settings to change false to true in the following, which exposed the toggles to allow fields to be seen and edited, but didn’t help.

    public static function render_field_settings( $field ) {
    			if ( apply_filters( 'acf/rest_api/field_settings/show_in_rest', true ) ) {
    				self::show_in_rest( $field );
    			}
    
    			if ( apply_filters( 'acf/rest_api/field_settings/edit_in_rest', true ) ) {
    				self::edit_in_rest( $field );
    			}
    		}
  • The topic ‘Updating product ACF fields’ is closed to new replies.