Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rajamohammed's full-sized avatar

Raja Mohammed rajamohammed

View GitHub Profile
@jan-koch
jan-koch / woo-add-custom-sku.php
Last active July 16, 2021 10:39
Add a custom SKU field to WooCommerce products.
<?php
function jk_add_custom_sku() {
$args = array(
'label' => __( 'Custom SKU', 'woocommerce' ),
'placeholder' => __( 'Enter custom SKU here', 'woocommerce' ),
'id' => 'jk_sku',
'desc_tip' => true,
'description' => __( 'This SKU is for internal use only.', 'woocommerce' ),
);
@maddisondesigns
maddisondesigns / functions.php
Last active February 7, 2024 13:42
WooCommerce Custom Fields for Simple & Variable Products
/*
* Add our Custom Fields to simple products
*/
function mytheme_woo_add_custom_fields() {
global $woocommerce, $post;
echo '<div class="options_group">';
// Text Field
@bcinarli
bcinarli / fontface.scss
Created October 19, 2013 12:50
Font-face mixin for SASS
@mixin fontface($name, $file, $weight: normal, $style: normal){
@font-face {
font-family: "#{$name}";
src: url('../fonts/#{$file}.eot');
src: url('../fonts/#{$file}.eot?#iefix') format('embedded-opentype'),
url('../fonts/#{$file}.woff') format('woff'),
url('../fonts/#{$file}.ttf') format('truetype'),
url('../fonts/#{$file}.svg?#webfont') format('svg');
font-weight: $weight;
font-style: $style;
@irazasyed
irazasyed / Install Composer using MAMP's PHP.md
Last active April 2, 2024 18:45
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

Installation

To install, you need to have the WordPress i18n library on your computer. Check it out using SVN:

sudo svn co http://i18n.svn.wordpress.org/tools/trunk/ /usr/lib/wpi18n

You don't have to put the library in /usr/lib/wpi18n, but if you don't put it there, make sure to set the $WP_I18N_LIB environment variable in your .bashrc or .bash_profile file (with no trailing slash):

export WP_I18N_LIB="/path/to/i18n/lib"