/** * * * @since 1.0.1 * @update 1.1.7 */ static function get_payment_gateways_html($post_id = false) { $all = self::get_payment_gateways(); if (is_array($all) and !empty($all)) { $i = 1; $available = array(); foreach ($all as $key => $value) { if (method_exists($value, 'is_available') and $value->is_available()) { if (!$post_id) { $post_id = STCart::get_booking_id(); } if ($value->is_available($post_id)) { $available[] = $value; } } } if (!empty($available)) { foreach ($available as $key => $value) { echo "<div class='payment_gateway_item'> "; $value->html(); echo "</div>"; if ($i < count($available)) { echo '<div class="st-hr text-center m20" > <hr> <span class="st-or">' . __('Or', ST_TEXTDOMAIN) . '</span> </div>'; } $i++; } } } }