settings_store = $settings_store; $this->api_client = $api_client; add_action( 'admin_init', array( $this, 'add_privacy_message' ) ); add_action( 'admin_notices', array( $this, 'add_erasure_notice' ) ); add_filter( 'woocommerce_privacy_export_order_personal_data', array( $this, 'label_data_exporter' ), 10, 2 ); add_action( 'woocommerce_privacy_before_remove_order_personal_data', array( $this, 'label_data_eraser' ) ); } /** * Gets the privacy message to display in the admin panel */ public function add_privacy_message() { if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) { return; } $title = __( 'WooCommerce Shipping & Tax', 'woocommerce-services' ); $content = wpautop( sprintf( wp_kses( __( 'By using this extension, you may be storing personal data or sharing data with external services. Learn more about how this works, including what you may want to include in your privacy policy.', 'woocommerce-services' ), array( 'a' => array( 'href' => array(), 'target' => array(), ), ) ), 'https://jetpack.com/support/for-your-privacy-policy/#woocommerce-services' ) ); wp_add_privacy_policy_content( $title, $content ); } /** * If WooCommerce order data erasure is enabled, display a warning on the erasure page */ public function add_erasure_notice() { $screen = get_current_screen(); if ( 'tools_page_remove_personal_data' !== $screen->id ) { return; } $erasure_enabled = wc_string_to_bool( get_option( 'woocommerce_erasure_request_removes_order_data', 'no' ) ); if ( ! $erasure_enabled ) { return; } ?>