function dt_woocommerce_add_config_actions()
 {
     $config = presscore_get_config();
     $mod_wc_config = dt_woocommerce_template_config($config);
     add_action('dt_wc_loop_start', array($mod_wc_config, 'setup'));
     add_action('dt_wc_loop_end', array($mod_wc_config, 'cleanup'));
 }
 /**
  * Init theme config for shop.
  *
  * @param string $name
  */
 function dt_woocommerce_configure_template($name = '')
 {
     dt_woocommerce_configure_mini_cart();
     // Add template configuration actions.
     $config = presscore_config();
     $mod_wc_config = dt_woocommerce_template_config($config);
     add_action('dt_wc_loop_start', array($mod_wc_config, 'setup'));
     add_action('dt_wc_loop_end', array($mod_wc_config, 'cleanup'));
     // Stop if not on woocommerce page.
     if ('shop' !== $name) {
         return;
     }
     // From what page get settings?
     $post_id = null;
     if (is_shop()) {
         $post_id = woocommerce_get_page_id('shop');
     } else {
         if (is_cart()) {
             $post_id = woocommerce_get_page_id('cart');
         } else {
             if (is_checkout()) {
                 $post_id = woocommerce_get_page_id('checkout');
             }
         }
     }
     if ($post_id) {
         $config->set('post_id', $post_id);
     }
     if (!is_product()) {
         add_filter('presscore_get_page_title', 'dt_woocommerce_get_page_title', 20);
     }
     // Replace theme breadcrumbs.
     add_filter('presscore_get_breadcrumbs-html', 'dt_woocommerce_replace_theme_breadcrumbs', 20, 2);
 }