/**
  * Helper method to fall back to WooCommerce core archive front end rendering or Views archive
  * If Layouts plugin is activated but no Layouts has been assigned to an archive
  * Since 2.4.1
  * @access public
  * @return void
  */
 public function wc_views_check_if_anyproductarchive_has_layout()
 {
     if (defined('WPDDL_VERSION')) {
         //Layouts is activated on this site
         global $wpddlayout, $woocommerce;
         if (is_object($wpddlayout) & is_object($woocommerce)) {
             //Rule below applies only to WooCommerce product archives
             if (is_shop() || is_product_category() || is_product_tag() || is_product_taxonomy()) {
                 if (class_exists('WPDD_Layouts_RenderManager')) {
                     $layouts_render_manager_instance = WPDD_Layouts_RenderManager::getInstance();
                     if (method_exists($layouts_render_manager_instance, 'get_layout_id_for_render')) {
                         $layouts_id_to_render = $layouts_render_manager_instance->get_layout_id_for_render(false, $args = null);
                         $layouts_id = intval($layouts_id_to_render);
                         if ($layouts_id > 0) {
                             //This constant defined only once
                             define('WC_VIEWS_ARCHIVES_LAYOUTS', true);
                         }
                     }
                 }
             }
         }
     }
 }
 public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new WPDD_Layouts_RenderManager();
     }
     return self::$instance;
 }
 function set_up_cell_fields_by_id($cell_id, $layout_id, $args = array())
 {
     $layout = WPDD_Layouts_RenderManager::getInstance()->get_rendered_layout($layout_id);
     if ($layout instanceof WPDD_layout == false) {
         return;
     }
     $cell = $layout->get_cell_by_id($cell_id);
     if ($cell instanceof WPDD_layout_element === false) {
         return;
     }
     $target = WPDD_Layouts_RenderManager::getInstance()->get_layout_renderer($layout, $args);
     if ($target instanceof WPDD_layout_render === false) {
         return;
     }
     $content = $cell->get_translated_content($target->get_context());
     global $ddl_fields_api;
     $ddl_fields_api->set_current_cell_content($content);
 }
function is_ddlayout_assigned()
{
    return WPDD_Layouts_RenderManager::getInstance()->item_has_ddlayout_assigned();
}