Skip to content

Instantly share code, notes, and snippets.

View Abd-Ur-Rehman's full-sized avatar
🎯
👨‍💻Living and breathing in code...

Abd Ur Rehman Abd-Ur-Rehman

🎯
👨‍💻Living and breathing in code...
View GitHub Profile
// adding a new role //
add_role( 'pending', __('Pending' ),array(
'read' => true,
)
);
// Assigning a new role //
add_filter('woocommerce_new_customer_data', 'abdurrehman_net_custom_role', 10, 1);
function abdurrehman_net_custom_role($args) {
$args['role'] = 'pending';
@font-face {
font-family: 'MyWebFont';
src: url('path-to-your-font-directory/font_name.eot');
src: url('path-to-your-font-directory/font_name.eot?#iefix') format('embedded-opentype'),
url('path-to-your-font-directory/font_name.woff') format('woff'),
url('path-to-your-font-directory/font_name.ttf') format('truetype'),
url('path-to-your-font-directory/font_name.svg#svgFontName') format('svg');
}
body {
font-family: 'MyWebFont', sans-serif;
}
@import url(//fonts.googleapis.com/css?family=Open+Sans);
body {
font-family: 'Open Sans', sans-serif;
}
server {
listen 80;
server_name yoursite.com www.yoursite.com;
return 301 https://yoursite.com$request_uri;
}
define('FORCE_SSL_ADMIN', true);
@Abd-Ur-Rehman
Abd-Ur-Rehman / remove-zoom-woocommerce-3.php
Created May 9, 2017 22:31
remove-zoom-woocommerce-3.php
<?php
function abdurrehman_rm_z_woo() {
remove_theme_support( 'wc-product-gallery-zoom' );
}
add_action( 'after_setup_theme', 'abdurrehman_rm_z_woo', 11 );