woocommerce_wpml = &$woocommerce_wpml; $this->sitepress = &$sitepress; $this->next_step_url = $next_step_url; } public function get_model(){ $WCML_Status_Store_Pages_UI = new WCML_Status_Store_Pages_UI($this->sitepress , $this->woocommerce_wpml); $store_pages_view = $WCML_Status_Store_Pages_UI->get_view(); if( 'non_exist' == $this->woocommerce_wpml->store->get_missing_store_pages() ){ $store_pages_view = '
' . __('One or more WooCommerce pages have not been created') . '
'; $store_pages_view .= ''; }else{ $store_pages_view = preg_replace('@
@', '', $store_pages_view); $store_pages_view = preg_replace('@@', '', $store_pages_view); } $store_pages_view .= ''; $model = array( 'strings' => array( 'step_id' => 'store_pages_step', 'heading' => __('Translate Store Pages', 'woocommerce-multilingual'), 'description' => __("All store pages must be translated in the languages configured on the site.", 'woocommerce-multilingual'), 'continue' => __('Continue', 'woocommerce-multilingual'), ), 'store_pages' => $store_pages_view, 'continue_url' => $this->next_step_url ); return $model; } protected function init_template_base_dir() { $this->template_paths = array( WCML_PLUGIN_PATH . '/templates/', ); } public function get_template() { return '/setup/store-pages.twig'; } }