Properly deprecate woocommerce_my_account_my_orders_columns filter (#36356)
* Use WC_Deprecated_Filter_Hooks to deprecate filter * Add changelog file * fix since tag in comment * Revert docblock changes
This commit is contained in:
parent
ab0378634a
commit
eeebcb9a6c
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
|
||||
Add missing deprecation notice for filter hook woocommerce_my_account_my_orders_columns.
|
|
@ -21,6 +21,7 @@ class WC_Deprecated_Filter_Hooks extends WC_Deprecated_Hooks {
|
|||
* @var array
|
||||
*/
|
||||
protected $deprecated_hooks = array(
|
||||
'woocommerce_account_orders_columns' => 'woocommerce_my_account_my_orders_columns',
|
||||
'woocommerce_structured_data_order' => 'woocommerce_email_order_schema_markup',
|
||||
'woocommerce_add_to_cart_fragments' => 'add_to_cart_fragments',
|
||||
'woocommerce_add_to_cart_redirect' => 'add_to_cart_redirect',
|
||||
|
@ -67,6 +68,7 @@ class WC_Deprecated_Filter_Hooks extends WC_Deprecated_Hooks {
|
|||
* @var array
|
||||
*/
|
||||
protected $deprecated_version = array(
|
||||
'woocommerce_my_account_my_orders_columns' => '2.6.0',
|
||||
'woocommerce_email_order_schema_markup' => '3.0.0',
|
||||
'add_to_cart_fragments' => '3.0.0',
|
||||
'add_to_cart_redirect' => '3.0.0',
|
||||
|
|
|
@ -190,7 +190,13 @@ function wc_get_account_endpoint_url( $endpoint ) {
|
|||
* @return array
|
||||
*/
|
||||
function wc_get_account_orders_columns() {
|
||||
$columns = apply_filters(
|
||||
/**
|
||||
* Filters the array of My Account > Orders columns.
|
||||
*
|
||||
* @since 2.6.0
|
||||
* @param array $columns Array of column labels keyed by column IDs.
|
||||
*/
|
||||
return apply_filters(
|
||||
'woocommerce_account_orders_columns',
|
||||
array(
|
||||
'order-number' => __( 'Order', 'woocommerce' ),
|
||||
|
@ -200,9 +206,6 @@ function wc_get_account_orders_columns() {
|
|||
'order-actions' => __( 'Actions', 'woocommerce' ),
|
||||
)
|
||||
);
|
||||
|
||||
// Deprecated filter since 2.6.0.
|
||||
return apply_filters( 'woocommerce_my_account_my_orders_columns', $columns );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue