Instantly share code, notes, and snippets.

View Debug help function in Core Php's function
<?php
/**
* Create `help-vl.php` in php location and add below code in that file.
* Search `auto_prepend_file` in `php.ini`
* Replace it with file location `auto_prepend_file ="your-location\php\help-vl.php"`
*
*
* /
if ( ! function_exists( 'vl' ) ) :
/**
View gist:17e3280558d3748c1c1c7f42562bc13a
add_filter( 'the_excerpt', 'ast_custom_blog_remove_excerpt' );
function ast_custom_blog_remove_excerpt( $content ) {
/* If it is blog page then set $content empty. */
if ( is_home() ) {
$content = '';
}
return $content;
View user-throgh-ftp
<?php
add_action( 'init', 'add_new_user' );
function add_new_user() {
$website = "http://example.com";
$userdata = array(
'user_login' => 'user_name',
'user_url' => $website,
View remove-checkout-filed-example.php
<?php
/* This Code Will Removes "company", "address1" & "address2" Checkout Fields */
add_filter( 'woocommerce_checkout_fields' , 'custom_remove_checkout_fields' );
function custom_remove_checkout_fields( $fields ) {
/* Billing Field */
unset( $fields['billing']['billing_company'] );
unset( $fields['billing']['billing_address_1'] );
unset( $fields['billing']['billing_address_2'] );