Monday, 14 August 2017

How to make custom query in laravel to get data of last seven days?

Here is the custom query to get last seven days data in laravel

->whereRaw('Date(timestamp_order_made) >= (CURDATE() - INTERVAL 7 DAY)')

WOOCOMMERCE: CHANGE PAYPAL ICON ON CHECKOUT PAGE

Here is the hook and you need to add this in functions.php file:

function replacePPicon($iconUrl)
{
$theme_name = str_replace(" ", "-", strtolower(get_current_theme()));
$paypal_image = get_theme_root_uri() . '/' . $theme_name . '/img/paypal.png';
return $paypal_image; // change this to your IMAGE URL
}
add_filter('woocommerce_paypal_icon', 'replacePPicon');

disable the reviews tab

Here is the Hook and you need to add this in functions.php file

add_filter( 'woocommerce_product_tabs', 'wcs_woo_remove_reviews_tab', 98 );
function wcs_woo_remove_reviews_tab($tabs) {
 unset($tabs['reviews']);
 return $tabs;
}

WOOCOMMERCE: REMOVE SKU/TAG/CATEGORY META FROM PRODUCT PAGE

Here is hook and you need to add the functional file:

remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40);
add_action('woocommerce_before_single_product_summary', 'woocommerce_template_single_meta', 5);
function woocommerce_template_single_meta()
{
return false;
}

WOOCOMMERCE: REMOVE ADDITIONAL INFO TAB

Here is the hook and you need to add this in fuctions.php file:

add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
function woo_remove_product_tabs( $tabs ) {
    unset( $tabs['additional_information'] );
    return $tabs;
}

WOOCOMMERCE: REMOVE ANNOYING WOOTHEMES UPDATE NOTIFICATION

remove_action( 'admin_notices', 'woothemes_updater_notice' );

Google Map Filter Api Example

Here is Google Map Filter Api Example: