Example #1
0
 public function content($content)
 {
     global $wp_query;
     // Test that this is the main query and it is the confirm order page
     if (!$wp_query->is_main_query() || !is_shopp_page('confirm')) {
         return $content;
     }
     $Errors = ShoppErrors();
     $Order = ShoppOrder();
     do_action('shopp_init_confirmation');
     $Order->validated = $Order->isvalid();
     ob_start();
     ShoppStorefront()->_confirm_page_content = true;
     if ($Errors->exist(SHOPP_COMM_ERR)) {
         echo ShoppStorefront::errors(array('errors-confirm.php', 'errors.php'));
     }
     locate_shopp_template(array('confirm.php'), true);
     $content = ob_get_contents();
     unset(ShoppStorefront()->_confirm_page_content);
     ob_end_clean();
     return apply_filters('shopp_order_confirmation', $content);
 }