ASTRA_Ext_WooCommerce_Markup::checkout_place_order_button_text( string $button_text )
Checkout Place Order Button.
Description
Parameters
- $button_text
-
(string) (Required) Place order text.
Return
(string)
Source
File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php
public function checkout_place_order_button_text( $button_text ) {
if ( ! defined( 'CARTFLOWS_VER' ) && is_checkout() && ! is_wc_endpoint_url( 'order-received' ) && 'modern' === astra_get_option( 'checkout-layout-type' ) ) {
global $woocommerce;
$cart_total_with_symbol = '';
if ( isset( $woocommerce->cart->total ) && astra_get_option( 'checkout-modern-checkout-button-price' ) ) {
$cart_total = $woocommerce->cart->total;
$cart_total_with_symbol = ' ' . get_woocommerce_currency_symbol() . $cart_total;
}
$is_custom_text = astra_get_option( 'checkout-place-order-text' );
if ( $is_custom_text && ! empty( $is_custom_text ) ) {
$button_text = $is_custom_text;
}
$button_text = $button_text . $cart_total_with_symbol;
}
return $button_text;
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 3.9.0 | Introduced. |