Skip to content

Instantly share code, notes, and snippets.

View abdullahwp's full-sized avatar

Abdullah abdullahwp

View GitHub Profile
@abdullahwp
abdullahwp / gist:81583d18f6f2e1362b07b374997c041b
Created December 26, 2025 17:43 — forked from Qubadi/gist:e1fa473eefc84bacae1c242a1a6a1cc4
Jetformbuilder form, A custom code for auto detect country and land code phone.
UPDATED 28/04/2024
__________________
Jetformbuilder form, A custom code for auto detect country and land code phone.
This code works for all Jetformbuilder.
The provided custom code is a PHP function for WordPress that adds international telephone input functionality to a website.
It includes CDN links for the necessary CSS and JavaScript files, applies custom styles for the phone input field,
and uses jQuery for dynamic behavior. The JavaScript part initializes the international telephone input with features
like auto-detecting the user's country using their IP address and updating the input field with the full phone number
@abdullahwp
abdullahwp / jetengine-register-macro-custom-weekdays.php
Last active February 22, 2025 07:33
jetengine register macro for current day of the week for wordpress timezone
add_action( 'jet-engine/register-macros', function() {
class Custom_Weekday_Macro extends \Jet_Engine_Base_Macros {
/**
* Macros tag - this macro will look like %custom_weekday%
*/
public function macros_tag() {
return 'custom_weekday';
}
@abdullahwp
abdullahwp / view-subscription-shortcode.php
Created February 7, 2025 09:54
Shortcode to display WooCommerce Subscription user details on the user Account page.
<?php
/**
* Shortcode to display WooCommerce Subscription details on the My Account page.
*
* Usage examples:
* [woo_subscription_details]
* [woo_subscription_details subscription_id="123"]
*
* - If no subscription_id is provided, the shortcode automatically fetches the current user's subscriptions.
* * If the user has exactly one subscription, its details are shown.
@abdullahwp
abdullahwp / How to get jetengine's meta field in php
Created June 22, 2023 11:06
//There are 2 methods to get post/page meta field created via Jetenigine Plugin.
//Some of developers want to get page/posts meta fields in php code and want to run query with it or create shortcode and get jetengine's meta field in it.
//There are 2 methods to get post/page meta field created via Jetenigine Plugin.
//Jetengine method.
//Wordpress default method.
//-----------------------
@abdullahwp
abdullahwp / List of meta keys for billing, shipping information
Created June 15, 2023 12:30
List of meta keys for billing information in WooCommerce user's checkout fields
Here is the list of meta keys which you can use to manually update users information via custom form or jetengine's form/jetformbuilder.
Billing information's form fields meta keys
billing_last_name
billing_company