widgets = $widgets; return self::$instance; } /** * The function name comes from the widget base name "rtsb-products-archive". This is for theme support prefix with render. * * @return void */ public function render_rtsb_products_archive() { $controllers = $this->widgets->get_settings_for_display(); remove_action( 'woocommerce_before_shop_loop', 'storefront_woocommerce_pagination', 30 ); if ( empty( $controllers['show_pagination'] ) ) { remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 30 ); } remove_action( 'woocommerce_after_shop_loop', 'storefront_sorting_wrapper', 9 ); remove_action( 'woocommerce_after_shop_loop', 'storefront_sorting_wrapper_close', 31 ); remove_action( 'woocommerce_before_shop_loop', 'storefront_sorting_wrapper', 9 ); remove_action( 'woocommerce_before_shop_loop', 'storefront_sorting_wrapper_close', 31 ); remove_action( 'woocommerce_after_shop_loop', 'woocommerce_result_count', 20 ); remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); remove_action( 'woocommerce_after_shop_loop', 'woocommerce_catalog_ordering', 10 ); remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10 ); if ( ! empty( $controllers['show_pagination'] ) ) { if ( Fns::product_filters_has_ajax( 'shop' ) || Fns::product_filters_has_ajax( 'archive' ) ) { remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 30 ); } } } }