How to add Google Maps API Key to WordPress
Let’s go to the Google Cloud Platform
You have to add credit or debit card to use the Google Maps platform.
Create a new project
Enable APIs and Services
Search for these 3 APIs
- Maps JavaScript API
- Places API
- Geocoding API
Create the credentials
- Application restrictions must be HTTP referrers (web sites)
- Website restrictions is your website url
- API restrictions – select the above mentioned 3 API
and in the end just add the following snippet to your functions.php with your API key:
Install WordPress Plugins with Composer from Command Line
Create a file named composer.json in your theme folder. Copy and paste the following json snippet.
Open the terminal in the theme folder and type:
composer update
Remove product content based on category
Get Current Shipping Method WooCommerce
Update Cart on Quantity Change in WooCommerce
#1 Hide update cart button
.woocommerce button[name="update_cart"], .woocommerce input[name="update_cart"] { display: none; }
#2 Create a file named update-cart.js
jQuery( function( $ ) { $('.woocommerce').on('change', 'input.qty', function(){ $("[name='update_cart']").trigger("click"); }); });
#3 Enqueue it only on cart and checkout page
// CART function add_custom_scripts() { if( is_cart() ) { wp_enqueue_script( 'update-cart-js', get_stylesheet_directory_uri() . '/assets/js/update-cart.js' ); } add_action( 'wp_enqueue_scripts', 'add_custom_scripts' );
Order upcoming events by ACF datepicker
Minimum cart amount for specific category in WooCommerce
Disable Link to Single Product in WooCommerce Archive
Hide all warnings in WP admin
Attach file to WooCommerce order emails
WooCommerce Minimum order amount
Check if current product belongs to specific category on single product page
How to enqueue JavaScript Asynchronously in WordPress?
functions.php
How to Add Default Country to WooCommerce Checkout?
Display WooCommerce Products with ACF Repeater Field and Post Object
Hide If Empty WooCommerce Notification on Cart Page
Change order status to completed after successful payment in WooCommerce
How to force SSL with .htaccess
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]