Accessing property instead of using get function
-
I am getting these messages in our error logs:
2019/07/22 19:11:27 [error] 27000#0: *514 FastCGI sent in stderr: “PHP message: id was called incorrectly. Product properties should not be accessed directly. Backtrace: do_action(‘wp_ajax_get_variation_form’), WP_Hook->do_action, WP_Hook->apply_filters, Wc_updateVariationInCart->WOO_CK_WUVIC_get_variation_form, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.I see three calls to $product_woo_ck->id in the WOO_CK_WUVIC_get_variation_form fn in wp-content/plugins/woo-update-variations-in-cart/front/class-wc_update-variation_in-cart_ck.php. Can this be corrected to use the get__id() fn instead?
- The topic ‘Accessing property instead of using get function’ is closed to new replies.