Mailhog Requires Go 1.4+ to run so we will install GO language in system.
sudo apt install golang-go -y
Cross verify Go language is successfully installed.
| svn co --depth=files https://plugins.svn.wordpress.org/woocommerce/ # Checkout project without fetching content | |
| cd woocommerce | |
| svn up assets branches trunk # Fetch content for everything except for the tags | |
| svn up --set-depth=immediates tags # Create tags directory tree, but don't fetch any content | |
| svn up --set-depth=infinity tags/<tag_number> # Fetch content for a tag |
| add_filter( 'woocommerce_sale_flash', function( $string ) { | |
| echo '<span class="onsale">Promoção!</span>' | |
| }, 10 ); |
| <?php | |
| /** | |
| * Migrate repositorioes from Bitbucket to GitHub. | |
| * | |
| * Usage: php run.php | |
| * | |
| * @package CS\Bitbucket_to_Github | |
| * @license MIT License | |
| */ | |
| class CS_Bitbucket_to_Github |
| <?php | |
| /** | |
| * Plugin Name: No Gutenberg for old versins of WooCommerce | |
| * Plugin URI: https://gist.github.com/claudiosanches/d0231798eb6041e4911b4bca409ec1ac | |
| * Description: Disable Gutenberg in Edit Product screen for WooCommerce 3.4.x. | |
| * Author: Claudio Sanches | |
| * Author URI: https://claudiosanches.com | |
| * Version: 1.0.0 | |
| * License: GPLv3 | |
| * |
| <?php | |
| /** | |
| * Send "New User Registration" email to admins when new customer is created on WooCommerce. | |
| * | |
| * @param int $id New customer ID. | |
| */ | |
| function my_wc_customer_created_notification( $id ) { | |
| wp_new_user_notification( $id, null, 'admin' ); | |
| } |
| <?php | |
| /** | |
| * Restore single product "Free!" on WooCommerce 3.0. | |
| * | |
| * @param string $price Price HTML. | |
| * @param WC_Product $product Product instance. | |
| * @return string. | |
| */ | |
| function my_wc_custom_get_price_html( $price, $product ) { | |
| if ( $product->get_price() == 0 ) { |
| <?php | |
| /** | |
| * Adds a custom message about how long will take to delivery. | |
| */ | |
| function my_wc_custom_cart_shipping_notice() { | |
| echo '<tr class="shipping-notice"><td colspan="2"><small>'; | |
| _e( '<strong>Atenção:</strong> O prazo de entrega começa a contar a partir da aprovação do pagamento.', 'my-text-domain' ); | |
| echo '</small></td></tr>'; | |
| } |