Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //od Pavel Kočárek
- add_filter('woocommerce_order_button_html', 'order_button_with_price_html');
- function order_button_with_price_html($html) {
- $custom_text = esc_html__( 'Koupit za', 'woocommerce') . ' ' . WC()->cart->get_total();
- $html = '<button type="submit" class="button alt' . esc_attr(wc_wp_theme_get_element_class_name('button') ? ' ' . wc_wp_theme_get_element_class_name('button') : '') . '" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr(strip_tags(str_replace(['<br>', '<br/>', '<br />'], ' ', $custom_text))) . '">' . $custom_text . '</button>';
- return $html;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement