Amitpal Singh
Blog

Tutorials and code snippets

Fixes and how-tos for WordPress, WooCommerce, JavaScript, PHP and Cordova, written while building client projects.

Web development

How to add a custom URL to the My Account menu in any position

Add Custom URL in My Account menu in any position in woocommerce

WooCommerce

How to change any menu item label from My Account Menu section in woocommerce

How to change any menu item label from My Account Menu section in woocommerce

WooCommerce

How to remove any link from My Account menu in woocommerce with code

How to remove any link from My Account menu in woocommerce with code

WooCommerce

WooCommerce: Add New Tab in My Account Page (Custom Endpoint)

How to Add a New Tab @ WooCommerce My Account Page After adding this woocommerce custom end point in my account page. Please save the permalinks again…

WooCommerce

Add a profile picture (file upload) on My account > edit account in WooCommerce

Add a profile picture (file upload) on My account > edit account in WooCommerce You have 3 options to display a new field As the first field using…

WooCommerce

Retrieve coupon details from coupon code WooCommerce

$coupon_code = 'TASTY10'; global $woocommerce; $c = new WC_Coupon($coupon_code); echo "Discount Amount ".$c->amount." ";//Get Discount amount echo…

WooCommerce

WooCommerce: display coupons used in an order in the confirmation email and on the edit page

add_action( 'woocommerce_email_after_order_table', 'add_payment_method_to_admin_new_order', 15, 2 ); /** * Add used coupons to the order confirmation…

JavaScript

How to populate state dropdown based on option selected in country dropdown using jQuery?

How to populate state dropdown based on option selected in country dropdown using jQuery? jQuery html PHP

Web development

Custom Gallery Metabox

Custom Gallery Metabox

Android App Development

Error: more than one device and emulator

Error: more than one device and emulator

Web development

Split URL Parameters in Java Script

Split URL Parameters in Java Script

Web development

Get URL parameter and scroll to div then shake

Get URL parameter and scroll to div then shake