woocommerce_product_export_(export_type)_default_columns
Использование
add_filter( 'woocommerce_product_export_(export_type)_default_columns', 'wp_kama_woocommerce_product_export_type_default_columns_filter' ); /** * Function for `woocommerce_product_export_(export_type)_default_columns` filter-hook. * * @param $array * * @return */ function wp_kama_woocommerce_product_export_type_default_columns_filter( $array ){ // filter... return $array; }
- $array
- -
Где вызывается хук
woocommerce_product_export_(export_type)_default_columns
woocommerce/includes/export/class-wc-product-csv-exporter.php 107-154
return apply_filters( "woocommerce_product_export_{$this->export_type}_default_columns", array( 'id' => __( 'ID', 'woocommerce' ), 'type' => __( 'Type', 'woocommerce' ), 'sku' => __( 'SKU', 'woocommerce' ), 'name' => __( 'Name', 'woocommerce' ), 'published' => __( 'Published', 'woocommerce' ), 'featured' => __( 'Is featured?', 'woocommerce' ), 'catalog_visibility' => __( 'Visibility in catalog', 'woocommerce' ), 'short_description' => __( 'Short description', 'woocommerce' ), 'description' => __( 'Description', 'woocommerce' ), 'date_on_sale_from' => __( 'Date sale price starts', 'woocommerce' ), 'date_on_sale_to' => __( 'Date sale price ends', 'woocommerce' ), 'tax_status' => __( 'Tax status', 'woocommerce' ), 'tax_class' => __( 'Tax class', 'woocommerce' ), 'stock_status' => __( 'In stock?', 'woocommerce' ), 'stock' => __( 'Stock', 'woocommerce' ), 'low_stock_amount' => __( 'Low stock amount', 'woocommerce' ), 'backorders' => __( 'Backorders allowed?', 'woocommerce' ), 'sold_individually' => __( 'Sold individually?', 'woocommerce' ), /* translators: %s: weight */ 'weight' => sprintf( __( 'Weight (%s)', 'woocommerce' ), $weight_unit_label ), /* translators: %s: length */ 'length' => sprintf( __( 'Length (%s)', 'woocommerce' ), $dimension_unit_label ), /* translators: %s: width */ 'width' => sprintf( __( 'Width (%s)', 'woocommerce' ), $dimension_unit_label ), /* translators: %s: Height */ 'height' => sprintf( __( 'Height (%s)', 'woocommerce' ), $dimension_unit_label ), 'reviews_allowed' => __( 'Allow customer reviews?', 'woocommerce' ), 'purchase_note' => __( 'Purchase note', 'woocommerce' ), 'sale_price' => __( 'Sale price', 'woocommerce' ), 'regular_price' => __( 'Regular price', 'woocommerce' ), 'category_ids' => __( 'Categories', 'woocommerce' ), 'tag_ids' => __( 'Tags', 'woocommerce' ), 'shipping_class_id' => __( 'Shipping class', 'woocommerce' ), 'images' => __( 'Images', 'woocommerce' ), 'download_limit' => __( 'Download limit', 'woocommerce' ), 'download_expiry' => __( 'Download expiry days', 'woocommerce' ), 'parent_id' => __( 'Parent', 'woocommerce' ), 'grouped_products' => __( 'Grouped products', 'woocommerce' ), 'upsell_ids' => __( 'Upsells', 'woocommerce' ), 'cross_sell_ids' => __( 'Cross-sells', 'woocommerce' ), 'product_url' => __( 'External URL', 'woocommerce' ), 'button_text' => __( 'Button text', 'woocommerce' ), 'menu_order' => __( 'Position', 'woocommerce' ), ) );