get_settings_page(); $is_rendering_settings_ui_drill_down = $settings_ui_context->is_rendering_enabled() && $settings_ui_context->is_drill_down() && ! $settings_ui_context->has_schema_failed() && ! $settings_ui_context->has_script_handle_loading_failed(); } } catch ( \Throwable $e ) { $settings_ui_context = null; $settings_ui_settings_page = null; $is_rendering_settings_ui_drill_down = false; } // Drill-down pages replace the top-level settings tabs with their own header when the shell can render. $hide_nav = ( 'checkout' === $current_tab && in_array( $current_section, array( 'offline', 'bacs', 'cheque', 'cod' ), true ) ) || $is_rendering_settings_ui_drill_down; $is_settings_ui_page = null !== $settings_ui_settings_page; // Drill-down pages replace the section links with header breadcrumbs when the shell can render. if ( $settings_ui_settings_page instanceof WC_Settings_Page && $is_rendering_settings_ui_drill_down ) { remove_action( 'woocommerce_sections_' . $current_tab, array( $settings_ui_settings_page, 'output_sections' ) ); } // Move 'Advanced' to the last. if ( array_key_exists( 'advanced', $tabs ) ) { $advanced = $tabs['advanced']; unset( $tabs['advanced'] ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited $tabs['advanced'] = $advanced; } $marketplace_base_url = trailingslashit( esc_url_raw( apply_filters( 'woo_com_base_url', 'https://woocommerce.com/' ) ) ) . 'product-category/woocommerce-extensions/'; $marketplace_links = array( 'products' => array( 'url' => $marketplace_base_url . 'merchandising/', 'is_external' => true, /* translators: %1$s: opening link tag, %2$s: closing link tag */ 'message' => __( '%1$sExplore solutions%2$s that help highlight products and drive more sales.', 'woocommerce' ), ), 'tax' => array( 'url' => $marketplace_base_url . 'operations/sales-tax-and-duties/', 'is_external' => true, /* translators: %1$s: opening link tag, %2$s: closing link tag */ 'message' => __( '%1$sExplore solutions%2$s that help with tax calculations, compliance, and regional requirements.', 'woocommerce' ), ), 'shipping' => array( 'url' => $marketplace_base_url . 'shipping-delivery-and-fulfillment/', 'is_external' => true, /* translators: %1$s: opening link tag, %2$s: closing link tag */ 'message' => __( '%1$sExplore solutions%2$s that enhance shipping, delivery, and fulfillment workflows.', 'woocommerce' ), ), 'account' => array( 'url' => $marketplace_base_url . 'store-content-and-customizations/cart-and-checkout-features/', 'is_external' => true, /* translators: %1$s: opening link tag, %2$s: closing link tag */ 'message' => __( '%1$sExplore solutions%2$s that help customize cart and checkout flows.', 'woocommerce' ), ), 'email' => array( 'url' => $marketplace_base_url . 'marketing-extensions/email-marketing-extensions/', 'is_external' => true, /* translators: %1$s: opening link tag, %2$s: closing link tag */ 'message' => __( '%1$sExplore solutions%2$s that help automate and improve customer email communication.', 'woocommerce' ), ), 'general' => array( 'url' => admin_url( 'admin.php?page=wc-admin&path=%2Fextensions' ), 'is_external' => false, /* translators: %1$s: opening link tag, %2$s: closing link tag */ 'message' => __( '%1$sDiscover additional solutions%2$s to boost your business and expand what your store can do.', 'woocommerce' ), ), ); // The React recommendations component owns the marketplace link on the main // Shipping screen, but it does not render on subsections, zone screens, or for // users who cannot install plugins. $shipping_zone_id = ''; // phpcs:disable WordPress.Security.NonceVerification.Recommended -- Used only to select non-mutating view output. if ( isset( $_GET['zone_id'] ) && is_string( $_GET['zone_id'] ) ) { $shipping_zone_id = sanitize_text_field( wp_unslash( $_GET['zone_id'] ) ); } // phpcs:enable WordPress.Security.NonceVerification.Recommended $is_shipping_zone_screen = '' !== $shipping_zone_id; if ( 'shipping' === $current_tab && ( 'no' === get_option( 'woocommerce_show_marketplace_suggestions', 'yes' ) || ( '' === $current_section && ! $is_shipping_zone_screen && current_user_can( 'install_plugins' ) ) ) ) { unset( $marketplace_links['shipping'] ); } ?>

plugin_url() . '/assets/images/icons/external-link.svg'; $external_icon = ''; $screen_reader = '' . esc_html__( '(opens in a new tab)', 'woocommerce' ) . ''; $link_open = '' . $external_icon; $link_close = $screen_reader . ''; } else { $link_open = ''; $link_close = ''; } ?>