Product_Table implements Registerable
Integrates with Product Table.
Tags
Interfaces, Classes and Traits
- Registerable
Table of Contents
- register() : mixed
- remove_discount_content_in_buy_col() : string
- Remove the discount content in the buy column.
- render_discount_column() : string
- Render the discount column.
- set_default_column_name() : array<string|int, mixed>
- Set the default column name for the discount column.
Methods
register()
public
register() : mixed
Tags
Return values
mixed —remove_discount_content_in_buy_col()
Remove the discount content in the buy column.
public
remove_discount_content_in_buy_col(string $data, WC_Product $product) : string
Parameters
- $data : string
-
The column data.
- $product : WC_Product
-
The product.
Return values
string —The column data.
render_discount_column()
Render the discount column.
public
render_discount_column(string $data, WC_Product $product, array<string|int, mixed> $args) : string
Parameters
- $data : string
-
The column data.
- $product : WC_Product
-
The product.
- $args : array<string|int, mixed>
-
The column args.
Return values
string —The column data.
set_default_column_name()
Set the default column name for the discount column.
public
set_default_column_name(array<string|int, mixed> $defaults) : array<string|int, mixed>
The default column name is "Discount". This is the column name that will be used if the user does not change it. The priority of the column is set to the highest priority of the other columns + 1.
Parameters
- $defaults : array<string|int, mixed>
-
The default columns.
Return values
array<string|int, mixed> —The default columns.