greatwitenorth / quantities-and-units-for-woocommerce

Add unit support to items and allow decimal quantities in WooCommerce.
GNU General Public License v2.0
9 stars 18 forks source link

Use WooCommerce 3.0 CRUD #13

Open helgatheviking opened 5 years ago

helgatheviking commented 5 years ago

PHP Notice: directly accessing product properties:

[03-Sep-2019 17:32:50 UTC] PHP Notice: id was called incorrectly. Product properties should not be accessed directly. Backtrace: WP_List_Table->display, WP_List_Table->display_rows_or_placeholder, WP_Posts_List_Table->display_rows, WP_Posts_List_Table->_display_rows, WP_Posts_List_Table->single_row, WP_List_Table->single_row_columns, WP_Posts_List_Table->column_default, do_action('manage_product_posts_custom_column'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Admin_List_Table->render_columns, WC_Admin_List_Table_Products->render_price_column, WC_Product->get_price_html, WC_Product->get_price_suffix, apply_filters('woocommerce_get_price_suffix'), WP_Hook->apply_filters, WC_Quantities_and_Units_Product_Unit->get_price_suffix, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 3.0.) in /app/public/wp-includes/functions.php on line 4773

Example: $product->id though it looks like there are other places too.

This was deprecated in WooCommerce 3.0 and should be replaced with $product->get_id()

helgatheviking commented 5 years ago

Looks like I already took a pass at this 2 years ago in https://github.com/greatwitenorth/quantities-and-units-for-woocommerce/pull/11.