Add this logic to the _process_serial_purchase
function. Replace this line (~ Line number 900)
$subscription->totalOccurrences = $total_occurencies;
With whats given below
global $wpdb; | |
$heroes = $wpdb->get_results(" | |
SELECT `ID` , `sub_id` , `level_id`, `user_email` , `user_login` , `display_name` | |
FROM `wp_m_membership_relationships` | |
INNER JOIN `wp_users` ON wp_m_membership_relationships.user_id = wp_users.ID | |
WHERE `level_id` = 1 AND `sub_id` = 2 "); | |
foreach ($heroes as $hero) { | |
// Do stuff here | |
} |
SELECT member_fname, member_lname, member_email, join_date | |
FROM wp_enewsletter_members | |
#Specify Range here if needed | |
WHERE join_date | |
BETWEEN 2015-01-30 23:59:59 | |
AND 2015-02-01 23:59:59 | |
#Sort Order | |
ORDER BY wp_enewsletter_members.join_date ASC |
# You can pull additional data in the SELECT if needed | |
SELECT post_name, post_date, post_author, | |
post_status, post_parent, meta_value | |
# Both tables contain all the data you'll ever need with the plugin | |
FROM wp_posts | |
INNER JOIN wp_postmeta | |
ON wp_posts.ID = wp_postmeta.post_id | |
# You can set this to funder if you want to pull details on funds |
// The user ID whose sites to display | |
$queried_user_id = '1' ; | |
// Select the list of valid Blogs you want to filter from | |
$site_args = array( | |
'network_id' => $wpdb->siteid, | |
'public' => null, | |
'archived' => null, | |
'mature' => null, | |
'spam' => null, |
add_filter('ms_frontend_custom_registration_form','gravity_register_form') ; | |
function gravity_register_form($form) { | |
if(!is_user_logged_in()) | |
return do_shortcode('[gravity_form id =1]'); | |
return $form ; | |
} |
add_action('load_textdomain', 'load_custom_language_files_for_app_plugin', 10, 2); | |
function load_custom_language_files_for_app_plugin($domain, $mofile) | |
{ | |
if ('appointments' === $domain && plugin_dir_path($mofile) === WP_PLUGIN_DIR.'/appointments/languages/') | |
{ | |
// Put any path here | |
load_textdomain('appointments', WP_LANG_DIR.'/appointments/'.$domain.'-'.get_locale().'.mo'); | |
} | |
} |
<script type="text/javascript"> | |
jQuery(document).ready(function () { | |
if(window.location.href.indexOf("app_service_id") > -1 | |
&& !(window.location.href.indexOf("app_provider_id") > -1) ) { | |
jQuery(document).scrollTop( jQuery('.my-appointments').offset().top ); | |
} | |
}); | |
</script> |
add_filter('ms_frontend_custom_registration_form', 'custom_registration'); | |
function custom_registration () { | |
// Put your registration form shortcode here. | |
return do_shortcode('[gravityform id="1" title="false" description="false"]') ; | |
} |
boolean isTablet() { | |
DisplayMetrics metrics = new DisplayMetrics(); | |
this.getWindowManager().getDefaultDisplay().getMetrics(metrics); | |
float yInches = metrics.heightPixels / metrics.ydpi; | |
float xInches = metrics.widthPixels / metrics.xdpi; | |
double diagonalInches = Math.sqrt(xInches * xInches + yInches * yInches); | |
if (diagonalInches >= 5.5) { | |
return true; | |
} else { |