Set and get cookies without refreshing page.
setcookie('cookie_id', $cookie_value, time() + (86400 * 13)); $_COOKIE['cookie_id'] = $cookie_value;
setcookie('cookie_id', $cookie_value, time() + (86400 * 13)); $_COOKIE['cookie_id'] = $cookie_value;
$('selector').html($('selector').html().replace('text','replaced text'));
Adding cross icon insteade of remove text function filter_woocommerce_cart_totals_coupon_html( $coupon_html, $coupon, $discount_amount_html ) { // Change text $coupon_html = ' <a href="' . esc_url( add_query_arg( 'remove_coupon', rawurlencode( $coupon->get_code() ), defined(…
Adding coupon removing icon to coupon label function filter_woocommerce_cart_totals_coupon_label( $label, $coupon ) { $label .= ' <a href="' . esc_url( add_query_arg( 'remove_coupon', rawurlencode( $coupon->get_code() ), defined( 'WOOCOMMERCE_CHECKOUT' ) ? wc_get_checkout_url() :…
We can easily add our custom script in woocomerce checkout page by adding the following fuction in function.php of active theme folder function add_checkout_script() { ?> <script type="text/javascript"> jQuery(document).on( "updated_checkout",…
For example we are going to implement add to cart button in product loop Step 1: At first we have to enable ajax in woocommerce dashboard then create add to…
Risk 1 and Risk 2আমার অভিজ্ঞতা, গত মাসে রিস্ক ১ করতে ক্লাসে ঢুকলাম তারপর তিন ঘন্টা হা করে বসে শুনলাম টিচার কি বলে, ভাগ্যিস মুখে মাক্স ছিল তাই মশা মাছি…
I quickly checked this by $ free -m And the output suggested that there is no swap file provisioned. This is how the output looked - total used free shared…
Creating function for tracking ip in function.php /* get user locations */ function ip_info($ip = NULL, $purpose = "location", $deep_detect = TRUE) { $output = NULL; if (filter_var($ip, FILTER_VALIDATE_IP) ===…
We need to add bellow urls in Excluded JavaScript files block in Delay Javascript execution /jquery-latest.min.js /jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js /jquery-migrate(.min)?.js /wp-content/plugins/ultimate-carousel-for-visual-composer/js/custom-tm.js /wp-content/plugins/ultimate-carousel-for-visual-composer/js/slick.js /woocommerce/(.*)/assets/js/zoom/jquery.zoom.min.js /woocommerce/(.*)/assets/js/photoswipe/ /woocommerce/(.*)/assets/js/flexslider/jquery.flexslider.min.js /woocommerce/(.*)/assets/js/frontend/single-product.min.js wc_single_product_params