Class WC_Admin_CPT_Product

WC_Admin_CPT_Product Class

WC_Admin_CPT
Extended by WC_Admin_CPT_Product
Package: WooCommerce\Admin\Post
Author: WooThemes
Located at includes/admin/post-types/class-wc-admin-cpt-product.php

Methods summary

public
# __construct( )

Constructor

Constructor

Overrides

WC_Admin_CPT::__construct
public string
# featured_image_gettext( string $string = '' )

Replace 'Featured' when editing a product. Adapted from https://gist.github.com/tw2113/c7fd8da782232ce90176

Replace 'Featured' when editing a product. Adapted from https://gist.github.com/tw2113/c7fd8da782232ce90176

Parameters

$string
string
$string string being translated

Returns

string
after manipulation
public array
# media_view_strings( array $strings = array(), object $post = null )

Change "Featured Image" to "Product Image" throughout media modals.

Change "Featured Image" to "Product Image" throughout media modals.

Parameters

$strings
array
$strings Array of strings to translate.
$post
object
$post

Returns

array
public string
# enter_title_here( string $text, object $post )

Change title boxes in admin.

Change title boxes in admin.

Parameters

$text
string
$text
$post
object
$post

Returns

string
public
# product_data_visibility( )

Output product visibility options.

Output product visibility options.

public
# pre_post_update( integer $post_id )

Some functions, like the term recount, require the visibility to be set prior. Lets save that here.

Some functions, like the term recount, require the visibility to be set prior. Lets save that here.

Parameters

$post_id
integer
$post_id
public array
# wp_insert_post_data( array $data )

Forces certain product data based on the product's type, e.g. grouped products cannot have a parent.

Forces certain product data based on the product's type, e.g. grouped products cannot have a parent.

Parameters

$data
array
$data

Returns

array
public
# edit_columns( mixed $existing_columns )

Change the columns shown in admin.

Change the columns shown in admin.

public
# custom_columns( string $column )

Define our custom columns shown in admin.

Define our custom columns shown in admin.

Parameters

$column
string
$column
public array
# custom_columns_sort( mixed $columns )

Make product columns sortable

Make product columns sortable

https://gist.github.com/906872

Parameters

$columns
mixed
$columns

Returns

array
public array
# custom_columns_orderby( mixed $vars )

Product column orderby

Product column orderby

http://scribu.net/wordpress/custom-sortable-columns.html#comment-4732

Parameters

$vars
mixed
$vars

Returns

array
public array
# default_sorting_link( array $views )

Product sorting link

Product sorting link

Based on Simple Page Ordering by 10up (http://wordpress.org/extend/plugins/simple-page-ordering/)

Parameters

$views
array
$views

Returns

array
public
# product_filters( )

Show a category filter box

Show a category filter box

public
# product_filters_query( mixed $query )

Filter the products in admin based on options

Filter the products in admin based on options

Parameters

$query
mixed
$query
public string
# product_search( string $where )

Search by SKU or ID for products.

Search by SKU or ID for products.

Parameters

$where
string
$where

Returns

string
public array
# disable_checked_ontop( array $args )

Maintain term hierarchy when editing a product.

Maintain term hierarchy when editing a product.

Parameters

$args
array
$args

Returns

array
public
# bulk_edit( mixed $column_name, mixed $post_type )

Custom bulk edit - form

Custom bulk edit - form

Parameters

$column_name
mixed
$column_name
$post_type
mixed
$post_type
public
# quick_edit( mixed $column_name, mixed $post_type )

Custom quick edit - form

Custom quick edit - form

Parameters

$column_name
mixed
$column_name
$post_type
mixed
$post_type
public integer
# bulk_and_quick_edit_save_post( integer $post_id, WP_Post $post )

Quick and bulk edit saving

Quick and bulk edit saving

Parameters

$post_id
integer
$post_id
$post
WP_Post
$post

Returns

integer
public
# bulk_edit_save( mixed $post_id, mixed $product )

Bulk edit

Bulk edit

public array
# upload_dir( array $pathdata )

Filter the directory for uploads.

Filter the directory for uploads.

Parameters

$pathdata
array
$pathdata

Returns

array
public
# woocommerce_media_upload_downloadable_product( )

Run a filter when uploading a downloadable product.

Run a filter when uploading a downloadable product.

public string
# ms_protect_download_rewite_rules( mixed $rewrite )

Protect downloads from ms-files.php in multisite

Protect downloads from ms-files.php in multisite

Parameters

$rewrite
mixed
$rewrite

Returns

string
public
# process_product_file_download_paths( integer $product_id, integer $variation_id, array $downloadable_files )

Grant downloadable file access to any newly added files on any existing orders for this product that have previously been granted downloadable file access

Grant downloadable file access to any newly added files on any existing orders for this product that have previously been granted downloadable file access

Parameters

$product_id
integer
$product_id product identifier
$variation_id
integer
$variation_id optional product variation identifier
$downloadable_files
array
$downloadable_files newly set files

Methods inherited from WC_Admin_CPT

change_insert_into_post()

Magic methods summary

Properties summary

Properties inherited from WC_Admin_CPT

$type

WooCommerce API documentation generated by ApiGen 2.8.0