- Install Homebrew:
Install Homebrew : /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install GNU gettext:
brew install gettext
- Then you must add that package to your path:
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
- Restart your computer! (Otherwise you will get "sh: msguniq: command not found" error).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WooCommerce Free Gift Coupons: Sync to Required Products | |
* Plugin URI: http://www.woocommerce.com/products/free-gift-coupons/ | |
* Description: Sync the quantity of the Free Gift product to the quantity of a required purchased product | |
* Version: 1.0.0.beta.1 | |
* Author: Kathy Darling | |
* Author URI: http://kathyisawesome.com | |
* Requires at least: 4.4 | |
* Tested up to: 5.1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Generate signature for ZoomMtg JSSDK. | |
* | |
* @param string $api_key You REST API Key | |
* @param string $api_secret You REST API Secret | |
* @param int $meeting_number The meeting number you are creating the signature for | |
* @param int $role Role that this signature is for; 0 for participant, 1 for host | |
* | |
* @return string Returns the signature string | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"state": "Abia", | |
"lgas": [ | |
"Aba North", | |
"Aba South", | |
"Arochukwu", | |
"Bende", | |
"Ikawuno", | |
"Ikwuano", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('woocommerce_single_product_image_thumbnail_html','wc_remove_link_on_thumbnails' ); | |
function wc_remove_link_on_thumbnails( $html ) { | |
return strip_tags( $html,'<img>' ); | |
} | |
//Did this help? Donate me some BTC: 1BEsm8VMkYhSFJ92cvUYwxCtsfsB2rBfiG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
\add_filter( 'wc_add_to_cart_message', function( $string, $product_id = 0 ) { | |
$start = strpos( $string, '<a href=' ) ?: 0; | |
$end = strpos( $string, '</a>', $start ) ?: 0; | |
return substr( $string, $end ) ?: $string; | |
} ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ fontWeight: '100' }, // Thin | |
{ fontWeight: '200' }, // Ultra Light | |
{ fontWeight: '300' }, // Light | |
{ fontWeight: '400' }, // Regular | |
{ fontWeight: '500' }, // Medium | |
{ fontWeight: '600' }, // Semibold | |
{ fontWeight: '700' }, // Bold | |
{ fontWeight: '800' }, // Heavy | |
{ fontWeight: '900' }, // Black |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Make sure the function does not exist before defining it | |
*/ | |
if( ! function_exists( 'remove_class_filter' ) ){ | |
/** | |
* Remove Class Filter Without Access to Class Object | |
* | |
* In order to use the core WordPress remove_filter() on a filter added with the callback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Add last paymenet date and next payment date to the members list and export CSV | |
Add this code into a custom plugin or your active theme's functions.php. | |
Note that "last payment" value will get the last order in "success", "cancelled", or "" status. | |
(Oddly enough, cancelled here means that the membership was cancelled, not the order.) | |
The "next payment" value is an estimate based on the billing cycle of the subscription and the last order date. | |
It may be off form the actual recurring date set at the gateway, especially if the subscription was updated at the gateway. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Version key/value should be on his own line | |
PACKAGE_VERSION=$(cat package.json \ | |
| grep version \ | |
| head -1 \ | |
| awk -F: '{ print $2 }' \ | |
| sed 's/[",]//g' \ | |
| tr -d '[[:space:]]') | |
echo $PACKAGE_VERSION |