MemberPress: Enable Phone Number Collection on Stripe Checkout
add_filter(‘mepr_stripe_checkout_session_args’, function($args) { $args[‘phone_number_collection’] = [ ‘enabled’ => ‘true’ ]; return $args; });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter(‘mepr_stripe_checkout_session_args’, function($args) { $args[‘phone_number_collection’] = [ ‘enabled’ => ‘true’ ]; return $args; });Continue reading
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
add_filter( ‘comment_form_default_fields’, function( $fields ) { if ( isset( $fields[‘url’] ) ) { $fields[‘url’] = str_replace( ‘Website’, ‘Webseite’, $fields[‘url’] ); } return $fields; });Continue reading
// 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
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
// 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
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
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
add_filter( ‘mepr-paywall-cookie-time’, function( $expire_time ) { // Set cookie expiration time to X days (replace X with the number of days) $expire_time = ( time() + 60 * 60 * 24 * X ); // X represents the number of…Continue reading
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