Skip to content

Commit

Permalink
Merge pull request #32756 from woocommerce/fix/hook_removal_from_32460
Browse files Browse the repository at this point in the history
Re-introduce woocommerce_product_csv_importer_check_import_file_path as deprecated
  • Loading branch information
claudiosanches committed Apr 26, 2022
2 parents 58203cf + 23fa1bc commit d880da0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 43 deletions.
5 changes: 5 additions & 0 deletions plugins/woocommerce/changelog/fix-hook_removal_from_32460
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: This fixes a bug that was introduced in a PR targetting the same Woo version.


Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ public static function get_importer( $file, $args = array() ) {
* @return bool
*/
public static function is_file_valid_csv( $file, $check_path = true ) {
/**
* Can be used to override the decision to check the import file path.
*
* @param bool $check_import_file_path If the import file path should be checked.
* @param string $file Path of the file to be checked.
*/
return wc_is_file_valid_csv( $file, $check_path );
}

Expand Down
76 changes: 39 additions & 37 deletions plugins/woocommerce/includes/class-wc-deprecated-filter-hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,44 @@ class WC_Deprecated_Filter_Hooks extends WC_Deprecated_Hooks {
* @var array
*/
protected $deprecated_hooks = array(
'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',
'woocommerce_product_get_width' => 'woocommerce_product_width',
'woocommerce_product_get_height' => 'woocommerce_product_height',
'woocommerce_product_get_length' => 'woocommerce_product_length',
'woocommerce_product_get_weight' => 'woocommerce_product_weight',
'woocommerce_product_get_sku' => 'woocommerce_get_sku',
'woocommerce_product_get_price' => 'woocommerce_get_price',
'woocommerce_product_get_regular_price' => 'woocommerce_get_regular_price',
'woocommerce_product_get_sale_price' => 'woocommerce_get_sale_price',
'woocommerce_product_get_tax_class' => 'woocommerce_product_tax_class',
'woocommerce_product_get_stock_quantity' => 'woocommerce_get_stock_quantity',
'woocommerce_product_get_attributes' => 'woocommerce_get_product_attributes',
'woocommerce_product_get_gallery_image_ids' => 'woocommerce_product_gallery_attachment_ids',
'woocommerce_product_get_review_count' => 'woocommerce_product_review_count',
'woocommerce_product_get_downloads' => 'woocommerce_product_files',
'woocommerce_order_get_currency' => 'woocommerce_get_currency',
'woocommerce_order_get_discount_total' => 'woocommerce_order_amount_discount_total',
'woocommerce_order_get_discount_tax' => 'woocommerce_order_amount_discount_tax',
'woocommerce_order_get_shipping_total' => 'woocommerce_order_amount_shipping_total',
'woocommerce_order_get_shipping_tax' => 'woocommerce_order_amount_shipping_tax',
'woocommerce_order_get_cart_tax' => 'woocommerce_order_amount_cart_tax',
'woocommerce_order_get_total' => 'woocommerce_order_amount_total',
'woocommerce_order_get_total_tax' => 'woocommerce_order_amount_total_tax',
'woocommerce_order_get_total_discount' => 'woocommerce_order_amount_total_discount',
'woocommerce_order_get_subtotal' => 'woocommerce_order_amount_subtotal',
'woocommerce_order_get_tax_totals' => 'woocommerce_order_tax_totals',
'woocommerce_get_order_refund_get_amount' => 'woocommerce_refund_amount',
'woocommerce_get_order_refund_get_reason' => 'woocommerce_refund_reason',
'default_checkout_billing_country' => 'default_checkout_country',
'default_checkout_billing_state' => 'default_checkout_state',
'default_checkout_billing_postcode' => 'default_checkout_postcode',
'woocommerce_system_status_environment_rows' => 'woocommerce_debug_posting',
'woocommerce_credit_card_type_labels' => 'wocommerce_credit_card_type_labels',
'woocommerce_settings_tabs_advanced' => 'woocommerce_settings_tabs_api',
'woocommerce_settings_advanced' => 'woocommerce_settings_api',
'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',
'woocommerce_product_get_width' => 'woocommerce_product_width',
'woocommerce_product_get_height' => 'woocommerce_product_height',
'woocommerce_product_get_length' => 'woocommerce_product_length',
'woocommerce_product_get_weight' => 'woocommerce_product_weight',
'woocommerce_product_get_sku' => 'woocommerce_get_sku',
'woocommerce_product_get_price' => 'woocommerce_get_price',
'woocommerce_product_get_regular_price' => 'woocommerce_get_regular_price',
'woocommerce_product_get_sale_price' => 'woocommerce_get_sale_price',
'woocommerce_product_get_tax_class' => 'woocommerce_product_tax_class',
'woocommerce_product_get_stock_quantity' => 'woocommerce_get_stock_quantity',
'woocommerce_product_get_attributes' => 'woocommerce_get_product_attributes',
'woocommerce_product_get_gallery_image_ids' => 'woocommerce_product_gallery_attachment_ids',
'woocommerce_product_get_review_count' => 'woocommerce_product_review_count',
'woocommerce_product_get_downloads' => 'woocommerce_product_files',
'woocommerce_order_get_currency' => 'woocommerce_get_currency',
'woocommerce_order_get_discount_total' => 'woocommerce_order_amount_discount_total',
'woocommerce_order_get_discount_tax' => 'woocommerce_order_amount_discount_tax',
'woocommerce_order_get_shipping_total' => 'woocommerce_order_amount_shipping_total',
'woocommerce_order_get_shipping_tax' => 'woocommerce_order_amount_shipping_tax',
'woocommerce_order_get_cart_tax' => 'woocommerce_order_amount_cart_tax',
'woocommerce_order_get_total' => 'woocommerce_order_amount_total',
'woocommerce_order_get_total_tax' => 'woocommerce_order_amount_total_tax',
'woocommerce_order_get_total_discount' => 'woocommerce_order_amount_total_discount',
'woocommerce_order_get_subtotal' => 'woocommerce_order_amount_subtotal',
'woocommerce_order_get_tax_totals' => 'woocommerce_order_tax_totals',
'woocommerce_get_order_refund_get_amount' => 'woocommerce_refund_amount',
'woocommerce_get_order_refund_get_reason' => 'woocommerce_refund_reason',
'default_checkout_billing_country' => 'default_checkout_country',
'default_checkout_billing_state' => 'default_checkout_state',
'default_checkout_billing_postcode' => 'default_checkout_postcode',
'woocommerce_system_status_environment_rows' => 'woocommerce_debug_posting',
'woocommerce_credit_card_type_labels' => 'wocommerce_credit_card_type_labels',
'woocommerce_settings_tabs_advanced' => 'woocommerce_settings_tabs_api',
'woocommerce_settings_advanced' => 'woocommerce_settings_api',
'woocommerce_csv_importer_check_import_file_path' => 'woocommerce_product_csv_importer_check_import_file_path',
);

/**
Expand Down Expand Up @@ -103,6 +104,7 @@ class WC_Deprecated_Filter_Hooks extends WC_Deprecated_Hooks {
'wocommerce_credit_card_type_labels' => '3.0.0',
'woocommerce_settings_tabs_api' => '3.4.0',
'woocommerce_settings_api' => '3.4.0',
'woocommerce_product_csv_importer_check_import_file_path' => '6.5.0',
);

/**
Expand Down

0 comments on commit d880da0

Please sign in to comment.