/**
  * Init the addons page.
  */
 public function addons_page()
 {
     WC_Admin_Addons::output();
 }
    ?>
		</ul>
		<br class="clear" />
		<?php 
    if ('featured' === $current_section) {
        ?>
			<div class="addons-featured">
				<?php 
        $featured = WC_Admin_Addons::get_featured();
        ?>
			</div>
		<?php 
    }
    ?>
		<?php 
    if ('featured' !== $current_section && ($addons = WC_Admin_Addons::get_section_data($current_section))) {
        ?>
			<ul class="products">
			<?php 
        foreach ($addons as $addon) {
            ?>
				<li class="product">
					<a href="<?php 
            echo esc_attr($addon->link);
            ?>
">
						<?php 
            if (!empty($addon->image)) {
                ?>
							<img src="<?php 
                echo esc_attr($addon->image);
"><?php 
        echo esc_html($section->title);
        ?>
</a><?php 
        if ($section_id !== end($section_keys)) {
            echo ' |';
        }
        ?>
</li>
			<?php 
    }
    ?>
		</ul>
		<br class="clear" />
		<?php 
    if ($addons = WC_Admin_Addons::get_section_data($current_section)) {
        ?>
			<ul class="products">
			<?php 
        foreach ($addons as $addon) {
            ?>
				<li class="product">
					<a href="<?php 
            echo esc_attr($addon->link);
            ?>
">
						<?php 
            if (!empty($addon->image)) {
                ?>
							<img src="<?php 
                echo esc_attr($addon->image);
$view = isset($_GET['view']) ? sanitize_text_field($_GET['view']) : '';
$theme = wp_get_theme();
?>

<div class="wrap woocommerce wc_addons_wrap">
	<div class="icon32 icon32-posts-product" id="icon-woocommerce"><br /></div>
	<h2>
		<?php 
_e('WooCommerce Add-ons/Extensions', 'woocommerce');
?>
		<a href="http://www.woothemes.com/product-category/woocommerce-extensions/" class="add-new-h2"><?php 
_e('Browse all extensions', 'woocommerce');
?>
</a>
		<?php 
WC_Admin_Addons::output_storefront_button();
?>
	</h2>
	<?php 
if ($addons) {
    ?>
		<ul class="subsubsub">
			<?php 
    $links = array('' => __('Popular', 'woocommerce'), 'payment-gateways' => __('Gateways', 'woocommerce'), 'shipping-methods' => __('Shipping', 'woocommerce'), 'import-export-extensions' => __('Import/export', 'woocommerce'), 'product-extensions' => __('Products', 'woocommerce'), 'marketing-extensions' => __('Marketing', 'woocommerce'), 'accounting-extensions' => __('Accounting', 'woocommerce'), 'free-extensions' => __('Free', 'woocommerce'), 'third-party-extensions' => __('Third-party', 'woocommerce'));
    $i = 0;
    foreach ($links as $link => $name) {
        $i++;
        ?>
<li><a class="<?php 
        if ($view == $link) {
            echo 'current';