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 [ 'sku' => [ 'myplugin_sku_field_id' => _wp('Custom SKU field name'), ], 'product' => [ 'myplugin_product_field_id' => _wp('Custom product field name'), ], ]; }