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

Backend – Custom Login Area

function innsiders_custom_login_style() { echo ‘ ‘; } add_action(‘login_head’, ‘innsiders_custom_login_style’); // Logo + Text über dem Formular platzieren (sicher!) add_filter(‘login_message’, function () { return ‘ WordPress Backend ‘; }); // Footer-Text add_action(‘login_footer’, function () { echo ‘ Support | [email protected] ‘;…Continue reading

Backend – Custom Dashboard

// INNSIDERS MEDIA – Custom Admin Dashboard function custom_dashboard_widget() { echo ‘ Innsiders Media GmbH Spinnereiinsel 3b 83059 Kolbermoor Telefon: 08031 / 900577-0 Web: www.innsiders-media.de Email: [email protected] Schreiben Sie uns ‘; } function add_custom_dashboard_widget() { wp_add_dashboard_widget(‘custom_dashboard_widget’, ‘Innsiders Media – Support’,…Continue reading

Admin footer modification (Innsiders Text)

function remove_footer_admin () { echo ‘WordPress Adminbereich der Innsiders Media GmbH‘; } add_filter(‘admin_footer_text’, ‘remove_footer_admin’); add_filter(‘body_class’,’add_category_to_single’); function add_category_to_single($classes) { if (!is_admin() && is_single() ) { global $post; foreach((get_the_category($post->ID)) as $category) { // add category slug to the $classes array $classes[] =…Continue reading