Hi. As of the most recent update of the software, I believe this code needs to be modified slightly since the original snippet ['. esc_html__( 'Checkout', 'woofc' ') . ] has changed. Can somebody please help me with that?
Thanks again, Dustin. I added the snippet to my themes functions file but the cart subtotal is not appearing in the flycart's checkout button. My guess is I missed something but let me know what you think.
So, please send me your website credentials (wp-admin link, username, password) then I can check and fix it for you. You also can create a dev/staging site with the same configurations then I'll work on it.
Hi. I'd like to add the cart total to the Checkout Button text in the fly cart. I want the button to read "Checkout - $X"
I've been working with the code below but it doesn't produce the cart total. What am I missing?
add_filter( 'gettext', 'woofc_gettext', 99, 3 );
function woofc_gettext( $translation, $text, $domain ) {
if ( $domain === 'woofc' && $text === 'Checkout' ) {
return 'Checkout - $' . $cart_total;
}
return $translation;
}
I've also tried this code below but haven't been able to return the cart total within the button:
function minicart_button_proceed_to_checkout() {
$new_checkout_link = WC()->cart->get_checkout_url();
$minicart_total = WC()->cart->total;
?>
<a href="<?php echo $new_checkout_link; ?>" class="woofc-action woofc-action-inner woofc-action-full">
<?php _e( 'Checkout - $' . $minicart_total, 'woofc' ); ?></a>
<?php
}
Hi Jonah,
Thank you for contacting WPClever Support Forum.
We’ve received your ticket and assigned one of our developers to help you with that.
He’ll be looking into your question and responding with specific instructions as soon as possible.
Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.
Best regards.
Janilyn T. - WPClever Support Agent
Hi Jonah,
If you're using the free version, please change the line 869 and 878 on our-plugin-folder/wpc-fly-cart.php
From:
To: https://www.screencast.com/t/NaKcg0xQ
If you're using the premium version, you can find it on the line 928 & 937.
Best regards,
Dustin
Thanks Frankie. Is there anyway to do that in the child theme function file instead?
Currently, we haven't a filter hook at this position, so you need to change the code manually.
We'll add it to the next updated version soon.
Best regards,
Dustin
Thanks, Frankie!
You're welcome!
If you are satisfied with our plugin and support, please reward it with a full five-star ★★★★★ ratin.
https://wordpress.org/support/plugin/woo-fly-cart/reviews/?filter=5
Thank you in advance! <3
Best regards,
Dustin
Hi. As of the most recent update of the software, I believe this code needs to be modified slightly since the original snippet ['. esc_html__( 'Checkout', 'woofc' ') . ] has changed. Can somebody please help me with that?
Hi Jonah,
In the latest version, you can change this text in the Localization tab https://www.screencast.com/t/fIhkmpcz87l
Best regards,
Dustin
Thanks, Dustin, but how do I add the cart subtotal to that checkout button?
Please add the below custom code (How to add custom code?)
Best regards,
Dustin
Thanks again, Dustin. I added the snippet to my themes functions file but the cart subtotal is not appearing in the flycart's checkout button. My guess is I missed something but let me know what you think.
Please ensure that you're using the latest version 4.1.0, then please update the cart (add or remove a product) to see the change.
Best regards,
Dustin
That worked, Dustin. Thank you!
You're welcome!
Feel free to submit a new ticket if you have any questions when using our plugin.
Best regards,
Dustin
Hi. As of the most recent plugin update, this fix is no longer working. Can I get an update to the work around?
Hi Jonah,
This snippet still works fine on my end https://www.screencast.com/t/Kg61OToe
So, please send me your website credentials (wp-admin link, username, password) then I can check and fix it for you. You also can create a dev/staging site with the same configurations then I'll work on it.
Best regards,
Dustin
Thanks, Dustin! I was a victim of a self-inflicted typo. Thank you for your help!
You're welcome!
Feel free to submit a new ticket if you have any questions when using our plugin.
Best regards,
Dustin