Last active
May 31, 2019 06:54
-
-
Save wpmudev-sls/4029a331dbcea306d1df565903dd074b to your computer and use it in GitHub Desktop.
[MarketPress] - Remove Login Section On Checkout Page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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