product_custom_fields

Allows declaration of custom product and SKU fields for importing via CSV file.

Shop-Script

Input (passed by reference)

No specific parameters.
… your plugin code …

Output

$return['product']

Associative array of custom product fields, where fields IDs are array keys and their localized names are array values.

$return['sku']

Associative array of custom SKU fields, where fields IDs are array keys and their localized names are array values.

Shop-Script

Plugin code example

PHP

public function productCustomFields()
{
    return array(
        'sku' => array(
            'myplugin_sku_field_id' => _wp('Custom SKU field name'),
        ),
        'product' => array(
            'myplugin_product_field_id' => _wp('Custom product field name'),
        ),
    );
}