MemberPress: Change Stripe Checkout Description

function mepr_change_stripe_checkout_desc($desc, $payment) { if (isset($payment->settings->stripe_checkout_enabled) && $payment->settings->stripe_checkout_enabled == ‘on’) { $desc = “Pay with Apple Pay”; // Edit this. } return $desc; } add_filter(‘mepr_signup_form_payment_description’, ‘mepr_change_stripe_checkout_desc’, 10, 2);Continue reading

EIN – Süße Tiere – Gutenberg ausschalten

// Gutenberg für Beiträge und Seiten deaktivieren add_filter(‘use_block_editor_for_post’, ‘__return_false’); add_filter(‘use_block_editor_for_post_type’, ‘__return_false’, 10, 2); // Klassische Widgets wiederherstellen add_filter(‘use_widgets_block_editor’, ‘__return_false’); // Menüverwaltung sicherstellen (optional) add_filter(‘gutenberg_use_widgets_block_editor’, ‘__return_false’); // Gutenberg-Styles aus dem Frontend entfernen add_action(‘wp_enqueue_scripts’, function () { wp_dequeue_style(‘wp-block-library’); // Standard Block-Styles wp_dequeue_style(‘wp-block-library-theme’);…Continue reading

AUS – Allgemein – Kommentare vollständig deaktivieren

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

EIN – Süße Tiere – Bildanzeige für WP-Beiträge

// Beitragsbilder in der Beitragsübersicht anzeigen function add_thumbnail_column($columns) { $columns[‘thumbnail’] = __(‘Beitragsbild’); return $columns; } function show_thumbnail_column($column, $post_id) { if ($column === ‘thumbnail’) { echo get_the_post_thumbnail($post_id, [50, 50]); } } add_filter(‘manage_posts_columns’, ‘add_thumbnail_column’); add_action(‘manage_posts_custom_column’, ‘show_thumbnail_column’, 10, 2);Continue reading

MemberPress: Generate All Invoices

function generate_bulk_invoices() { if( isset( $_REQUEST[ ‘generate-invoices’ ] ) ) { global $wpdb; $query = “SELECT id FROM {$wpdb->prefix}mepr_transactions WHERE status in (‘complete’, ‘confirmed’, ‘refunded’)”; $txn_ids = $wpdb->get_results( $query ); foreach( $txn_ids as $txn_id ) { $invoices = new MePdfInvoicesCtrl();…Continue reading

MemberPress: Add Currency Codes To MemberPress

function mepr_currency_codes( $codes ) { array_push( $codes, ‘EGP’ ); // Adds ‘EGP’ to the list of currency codes. To add a different currency, replace EGP with the three-letter currency code of the needed currency. return $codes; // Return the modified…Continue reading

WooCommerce | Add currency below Total at checkout

function add_currency_below_total() { $currency = get_woocommerce_currency(); // Get currency code (e.g., USD, CAD, EUR) echo ‘ ‘ . __(‘Currency’, ‘woocommerce’) . ‘ ‘ . esc_html($currency) . ‘ ‘; } add_action(‘woocommerce_review_order_after_order_total’, ‘add_currency_below_total’);Continue reading