Skip to content

Instantly share code, notes, and snippets.

View abdullahwp's full-sized avatar

Abdullah abdullahwp

View GitHub Profile
@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