Display Roster Entry

/** Display Roster Entry **/ // FOR DEBUGGING ONLY //$data = serialize(array(“Red”, “Green”, “Blue”)); //echo $data . ““; // //$test = unserialize($data); //var_dump($test); // $profile_id = um_profile_id(); $user = get_user($profile_id); $email = $user->email; //FOR DEBUGGING ONLY: // $email = “[email protected]”;…Continue reading

MemberPress: Code Blocks Pro – Load All Currently Enqueued Styles In the Courses ReadyLaunch Template

function my_theme_enqueue_scripts() { wp_enqueue_style( ‘code-block’, ‘https://yourdomain.com/wp-content/plugins/code-block-pro/src/front/style.css’, [], ‘1.0.0’, ‘all’ ); wp_enqueue_style( ‘code-block-font’, ‘https://yourdomain.com/wp-content/plugins/code-block-pro/build/fonts/Code-Pro-JetBrains-Mono-NL.ttf’, [], ‘1.0.0’, ‘all’ ); wp_enqueue_style( ‘code-block-css’, ‘https://yourdomain.com/wp-content/plugins/code-block-pro/build/style-index.css’, [], ‘1.0.0’, ‘all’ ); } add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_scripts’ ); add_filter(‘mpcs_classroom_style_handles’, function($allowed_handles){ $allowed_handles[] = ‘code-block’; $allowed_handles[] = ‘code-block-font’; $allowed_handles[] = ‘code-block-css’;…Continue reading

MemebrPress: Send Membership-Specific Welcome Email Only When Transaction Is Completed

function send_welcome_email_on_transaction_completed($event) { $txn = $event->get_data(); // Get the transaction data $usr = $txn->user(); // Get the user associated with the transaction MeprUtils::maybe_send_product_welcome_notices($txn, $usr); // Send the membership-specific welcome email } add_action(‘mepr-event-transaction-completed’, ‘send_welcome_email_on_transaction_completed’);Continue reading

rearrange shipping options

Add_filter(‘woocommerce_package_rates’, ‘wf_sort_shipping_methods’, 10, 2); function wf_sort_shipping_methods($available_shipping_methods, $package) { // Arrange shipping methods as per your requirement $sort_order = array( ‘wf_shipping_ups’ => array(), ‘wf_shipping_usps’ => array(), ‘free_shipping’ => array(), ‘local_pickup’ => array(), ‘legacy_flat_rate’ => array(), ); // unsetting all methods that…Continue reading

rearrange shipping options

Add_filter(‘woocommerce_package_rates’, ‘wf_sort_shipping_methods’, 10, 2); function wf_sort_shipping_methods($available_shipping_methods, $package) { // Arrange shipping methods as per your requirement $sort_order = array( ‘wf_shipping_ups’ => array(), ‘wf_shipping_usps’ => array(), ‘free_shipping’ => array(), ‘local_pickup’ => array(), ‘legacy_flat_rate’ => array(), ); // unsetting all methods that…Continue reading