Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WooCommerce 3.0 CRUD #13

Open
helgatheviking opened this issue Sep 3, 2019 · 1 comment
Open

Use WooCommerce 3.0 CRUD #13

helgatheviking opened this issue Sep 3, 2019 · 1 comment

Comments

@helgatheviking
Copy link

helgatheviking commented Sep 3, 2019

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 helgatheviking changed the title PHP Notice: directly accessing product properties Use WooCommerce 3.0 CRUD Sep 3, 2019
@helgatheviking
Copy link
Author

Looks like I already took a pass at this 2 years ago in #11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant