get_name / get_status is deprecated since version 1.7.0
-
Hallihallo Liebe Experten,
Mein debug.log hat sich heute morgen entschieden die folgenden Nachrichten auszuspucken:
[10-Dec-2020 10:41:17 UTC] Automattic\WooCommerce\Admin\Notes\WC_Admin_Note::get_name is deprecated since version 1.7.0! Use Automattic\WooCommerce\Admin\Notes\Note::get_name instead.
[10-Dec-2020 10:41:17 UTC] Automattic\WooCommerce\Admin\Notes\WC_Admin_Note::get_status is deprecated since version 1.7.0! Use Automattic\WooCommerce\Admin\Notes\Note::get_status instead.
Ich bin leider wieder hier bei Germanized gelandet weil ich denke da? diese function hier eine Rolle spielt.
public function on_update_admin_note( $note_id ) { $note = new \Automattic\WooCommerce\Admin\Notes\WC_Admin_Note( $note_id ); if ( $note ) { if ( strpos( $note->get_name(), 'wc-gzd-admin-' ) !== false ) { $note_name = str_replace( 'wc-gzd-admin-', '', $note->get_name() ); $note_name = str_replace( '-notice', '', $note_name ); $note_name = str_replace( '-', '_', $note_name ); if ( current_user_can( 'manage_woocommerce' ) ) { if ( 'disabled' === $note->get_status() ) { update_option( '_wc_gzd_hide_' . $note_name . '_notice', 'yes' ); } elseif( 'deactivated' === $note->get_status() ) { update_option( '_wc_gzd_disable_' . $note_name . '_notice', 'yes' ); } } } }
…w?re natürlich von jedem Rat bzw. L?süngsm?glichkeit begeistert.
MfG,
Chris
- The topic ‘get_name / get_status is deprecated since version 1.7.0’ is closed to new replies.