The commit message should be structured as follows:
<Emoji> <type>(<scope>): <subject>
|<---- Using a Maximum Of 50 Characters ---->|
| <?php | |
| /* | |
| * Changing WooCommerce City field to dropdown with predifned cities. | |
| * Based on https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/ | |
| */ | |
| function elicohenator_override_checkout_fields( $fields ) { | |
| // Create args for city fields - same for shipping & billing |
| "use strict"; | |
| // Gulp 4.0.0 + SASS, minification, TailwindCSS, PHP and BrowserSync support | |
| // (assumes you have your .scss + .css files in a /css directory) | |
| // william@wturrell.co.uk | |
| var gulp = require('gulp'), | |
| sass = require('gulp-sass'), | |
| cssnano = require('gulp-cssnano'), | |
| php = require('gulp-connect-php'), |
| <?php | |
| class MyTheme | |
| { | |
| private function actionAfterSetup($function) | |
| { | |
| add_action('after_setup_theme', function() use ($function) { | |
| $function(); | |
| }); | |
| } |
| /** | |
| * Hide shipping rates when free shipping is available, but keep "Local pickup" | |
| * Updated to support WooCommerce 2.6 Shipping Zones | |
| */ | |
| function hide_shipping_when_free_is_available( $rates, $package ) { | |
| $new_rates = array(); | |
| foreach ( $rates as $rate_id => $rate ) { | |
| // Only modify rates if free_shipping is present. | |
| if ( 'free_shipping' === $rate->method_id ) { |
| "use strict"; | |
| // Load plugins | |
| const autoprefixer = require("autoprefixer"); | |
| const browsersync = require("browser-sync").create(); | |
| const cp = require("child_process"); | |
| const cssnano = require("cssnano"); | |
| const del = require("del"); | |
| const eslint = require("gulp-eslint"); | |
| const gulp = require("gulp"); |
| <?php | |
| /** | |
| * Redirect a member for first time login. | |
| * Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| * www.paidmembershipspro.com | |
| */ | |
| function first_time_login_redirect( $redirect_to, $request, $user ) { | |
| //check level | |
| if ( ! empty( $user ) && ! empty( $user->ID ) && function_exists( 'pmpro_getMembershipLevelForUser' ) ) { |
| /** | |
| * Show cart contents / total Ajax | |
| */ | |
| add_filter( 'woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment' ); | |
| function woocommerce_header_add_to_cart_fragment( $fragments ) { | |
| global $woocommerce; | |
| ob_start(); |
| // Use in conjunction with https://gist.github.com/woogists/c0a86397015b88f4ca722782a724ff6c | |
| <a class="cart-customlocation" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf ( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a> |