Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpmudev-sls/4029a331dbcea306d1df565903dd074b to your computer and use it in GitHub Desktop.
Save wpmudev-sls/4029a331dbcea306d1df565903dd074b to your computer and use it in GitHub Desktop.
[MarketPress] - Remove Login Section On Checkout Page
<?php
/**
* Plugin Name: [MarketPress] - Remove Login Section On Checkout Page
* Plugin URI: https://premium.wpmudev.org/
* Author: WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_action( 'plugins_loaded', 'wpmudev_mp_remove_login_section_on_checkout_page_func', 100 );
function wpmudev_mp_remove_login_section_on_checkout_page_func() {
if ( defined( 'MP_VERSION' ) && class_exists( 'Marketpress' ) ) {
add_filter( 'mp_checkout/sections_array', function($sections){
if( isset( $sections['login-register'] ) ){
unset( $sections['login-register'] );
}
return $sections;
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment