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 | |
function ncydesign_custom_login_logo() { | |
echo '<style type="text/css"> | |
h1 a { background-image:url(https://ncy.local/wp-content/uploads/2019/10/letter-n.png) !important; } | |
</style>'; | |
} | |
add_action('login_head', 'ncydesign_custom_login_logo'); | |
?> |
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 | |
$result = add_role( | |
'basic_reader', | |
__( 'Basic Reader' ), | |
array( | |
'$role = get_role( 'basic_reader' ), | |
$role->add_cap( 'install_plugins' ), | |
$role = get_role( 'basic_reader' ), |
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 | |
/** | |
* @snippet Create a New User Role | |
* @author Ncy Design https://wordpress.ncy.design | |
* @compatible WooCommerce 3.7.0 | |
*/ | |
$result = add_role( | |
'gold_member', | |
__( 'Gold Member' ), | |
array( |
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
variable = add_role( ‘$role’, __( ‘$display_name’ ), array($capabilities)); |
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
/** | |
* @snippet WooCommerce Checkout date picker | |
* @author NCY Design https://wordpress.ncy.design | |
* @compatible WooCommerce 3.7.0 | |
*/ | |
// Register main datepicker jQuery plugin script | |
add_action( 'wp_enqueue_scripts', 'enabling_date_picker' ); | |
function enabling_date_picker() { | |
// Only on front-end and checkout page |
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
/** | |
* @snippet Shipping Phone in WooCommerce Checkout | |
* @author Ncy Design https://wordpress.ncy.design | |
* @compatible WooCommerce 3.7.0 | |
*/ | |
add_filter( 'woocommerce_checkout_fields', 'ncydesign_shipping_phone_checkout' ); | |
function ncydesign_shipping_phone_checkout( $fields ) { | |
$fields['shipping']['shipping_phone'] = array( |
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
/** | |
* @snippet Remove Order notes from WooCommerce Checkout Page | |
* @author NCY DESIGN https://wordpress.ncy.design | |
* @compatible WooCommerce 3.7.0 | |
*/ | |
add_filter( 'woocommerce_checkout_fields' , 'ncydesign_remove_ordernotes' ); | |
function ncydesign_remove_ordernotes( $fields ) { | |
unset($fields['order']['order_comments']); |
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
//Remove shipping Fields | |
unset($fields['shipping']['shipping_first_name']); //shipping First Name | |
unset($fields['shipping']['shipping_last_name']); //shipping Last Name | |
unset($fields['shipping']['shipping_company']); //shipping Company | |
unset($fields['shipping']['shipping_address_1']); // shipping Address 1 |
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
//Remove Billing Fields | |
unset($fields['billing']['billing_first_name']); //Billing First Name | |
unset($fields['billing']['billing_last_name']); //Billing Last Name | |
unset($fields['billing']['billing_company']); //Billing Company | |
unset($fields['billing']['billing_address_1']); // Billing Address 1 |
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
/** | |
* @snippet Remove Company Input field from WooCommerce Checkout Page | |
* @author NCY DESIGN https://wordpress.ncy.design | |
* @compatible WooCommerce 3.7.0 | |
*/ | |
add_filter( 'woocommerce_checkout_fields' , 'ncydesign_remove_woocommerce_checkout_fields' ); | |
function ncydesign_remove_woocommerce_checkout_fields( $fields ) { |
NewerOlder