Manage Admin Menus

function hide_admin_menus() { remove_menu_page( ‘edit.php’ ); // Posts remove_menu_page( ‘upload.php’ ); // Media remove_menu_page( ‘edit-comments.php’ ); // Comments remove_menu_page( ‘themes.php’ ); // Appearance remove_menu_page( ‘plugins.php’ ); // Plugins remove_menu_page( ‘users.php’ ); // Users remove_menu_page( ‘tools.php’ ); // Tools // remove_menu_page(…Continue reading

Soft Catalog Mode & Endpoint Shield

/** * LexiPress: Soft Catalog Mode & Endpoint Shield * Disables purchasing globally and redirects e-commerce endpoints to the homepage. */ if ( ! defined( ‘ABSPATH’ ) ) { exit; } // 1. Globally disable purchasing. This automatically removes all…Continue reading

Hotfix: Confirm password required on cherckout

add_action( ‘edd_pre_process_purchase’, function () { // Block checkout submits the confirmation as `edd_user_pass2`, // but checkout validation reads `edd_user_pass_confirm`. if ( empty( $_POST[‘edd_user_pass_confirm’] ) && ! empty( $_POST[‘edd_user_pass2’] ) ) { $_POST[‘edd_user_pass_confirm’] = $_POST[‘edd_user_pass2’]; } } );Continue reading

Register Custom AutomateWoo Action “Customer – Add to Blacklist Manager Whitelist Table”

if ( ! defined( ‘ABSPATH’ ) ) { exit; } add_filter( ‘automatewoo/actions’, ‘rd_aw_register_customer_add_to_blacklist_manager_whitelist_action’ ); function rd_aw_register_customer_add_to_blacklist_manager_whitelist_action( $actions ) { if ( ! class_exists( ‘\AutomateWoo\Action’ ) ) { return $actions; } if ( ! class_exists( ‘RD_AW_Action_Customer_Add_To_Blacklist_Manager_Whitelist’ ) ) { class RD_AW_Action_Customer_Add_To_Blacklist_Manager_Whitelist…Continue reading