Skip to content

Commit cb3b692

Browse files
committed
Changes in other file for removing html markup from tutor_price
1 parent c0e8b4c commit cb3b692

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

includes/tutor-general-functions.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,14 +1635,13 @@ function tutor_get_course_formatted_price_html( $course_id, $echo = true ) {
16351635
* Formatting as per ecommerce price settings
16361636
*
16371637
* @since 3.0.0
1638-
* @since 4.0.0 Added $html_markup for wooCommerce
16391638
*
16401639
* @param mixed $price Raw price.
16411640
* @param bool $html_markup Whether to include HTML markup ( Only for wooCommerce as it returns html markup ).
16421641
*
16431642
* @return string|void
16441643
*/
1645-
function tutor_get_formatted_price( $price, $html_markup = true ) {
1644+
function tutor_get_formatted_price( $price ) {
16461645
$price = floatval( Input::sanitize( $price ) );
16471646
$monetize_by = tutor_utils()->get_option( 'monetize_by' );
16481647
if ( Ecommerce::MONETIZE_BY === $monetize_by ) {
@@ -1655,7 +1654,7 @@ function tutor_get_formatted_price( $price, $html_markup = true ) {
16551654
$price = number_format( $price, $no_of_decimal, $decimal_separator, $thousand_separator );
16561655
$price = 'left' === $currency_position ? $currency_symbol . $price : $price . $currency_symbol;
16571656
} elseif ( 'wc' === $monetize_by ) {
1658-
$price = wc_price( $price, array( 'in_span' => $html_markup ) );
1657+
$price = wc_price( $price );
16591658
} elseif ( 'edd' === $monetize_by ) {
16601659
$price = edd_currency_filter( edd_format_amount( $price ) );
16611660
}

templates/dashboard/account/billing/order-history-card.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
use Tutor\Helpers\DateTimeHelper;
1616
use Tutor\Models\OrderModel;
1717

18-
$monetize_by = tutor_utils()->get_option( 'monetize_by' );
19-
$html_markup = 'wc' !== $monetize_by;
20-
$titles = OrderModel::get_order_history_titles( $order );
21-
$pay_link = OrderModel::get_order_history_pay_link( $order );
18+
$titles = OrderModel::get_order_history_titles( $order );
19+
$pay_link = OrderModel::get_order_history_pay_link( $order );
2220

2321
?>
2422
<div class="tutor-billing-card">
@@ -55,7 +53,7 @@
5553

5654
<div class="tutor-billing-card-right">
5755
<div class="tutor-billing-card-amount">
58-
<?php echo esc_html( tutor_get_formatted_price( $order->total_price, $html_markup ) ); ?>
56+
<?php echo esc_html( tutor_get_formatted_price( $order->total_price ) ); ?>
5957
</div>
6058

6159
<?php
@@ -70,7 +68,6 @@
7068
);
7169

7270
$order->titles = $titles;
73-
7471
OrderModel::render_billing_receipt_action( $order );
7572
?>
7673
</div>

0 commit comments

Comments
 (0)