These are small pieces of code that add minor functionality without the need for extra plugins. They can be used in either the functions.php file in a child theme, or in a utility plugin that you have created specifically for that purpose.
The idea is similar to the one currently available on the WooCommerce docs…
If you have a code snippet that you find useful in CC/WC then post it here and I will add it. Please include a sentence or two about what the snippet does and why it is useful.
This is fantastic!
The official classiccommerce.cc site is very good, looked it over last night. Also, took Classic Commerce for a test spin on a staging site - very fast and very impressed!
I do indeed have useful code snippets for WooCommerce. I will pass them on and you can adapt them for CP and CC functionality.
Keep up the good work!
PS
( Just sent you a message of the WC snippets we use, so you can choose and share. )
Your snippet to add the prefix to the $ sign is brilliant (US$, AU$, CA$, etc). I’m surprised that doesn’t come as a fundamental part of WC/CC. Seems like an obvious requirement for any shop selling to multiple countries.
Might be worth adding that as an enhancement request in GitHub.
(also like the redirect shop page one… that’s useful)
Hi Alan,
I’d like to take credit for the currency code, but it was taken from the web. I found lots of developers using that same code snippet. So why write it from scratch?
The only issue I have with it, is it places the currency prefix everywhere. It would be nicer if it was just for subtotals and totals.
The reason it isn’t added to WooCommerce by default, is they can’t up-sell plugins.
I’ve been putting an extension together for Classic Commerce and that’s going to be an awesome reference point - thank you for putting it together, that is a massive effort right there
If anyone testing out Classic Commerce would like to check the extension out and take it for a spin then it can be found here > Extend Commerce - just a few functions at the moment but it’s bound to grow. And apologies for lack of documentation but will get to it as soon as I can.
Yes very much so. Plus some new ones as Classic Commerce evolves and branches off in a new directions(a personal wish to see new functionality not present in WC)