/home/suroeste/public_html/wp-content/plugins/woocommerce/src/Internal/Admin
NameSizeModeActions
BlockTemplates/-0755rm
Logging/-0755rm
Marketing/-0755rm
Notes/-0755rm
Onboarding/-0755rm
Orders/-0755rm
ProductForm/-0755rm
ProductReviews/-0755rm
RemoteFreeExtensions/-0755rm
Schedulers/-0755rm
WCPayPromotion/-0755rm
ActivityPanels.php16160644editdlrm
Analytics.php91540644editdlrm
CategoryLookup.php81800644editdlrm
Coupons.php30310644editdlrm
CouponsMovedTrait.php22030644editdlrm
CustomerEffortScoreTracks.php175950644editdlrm
Events.php91140644editdlrm
FeaturePlugin.php66660644editdlrm
Homescreen.php88930644editdlrm
Loader.php204400644editdlrm
Marketing.php64050644editdlrm
Marketplace.php51590644editdlrm
MobileAppBanner.php9560644editdlrm
RemoteInboxNotifications.php9320644editdlrm
Settings.php134180644editdlrm
SettingsNavigationFeature.php44330644editdlrm
ShippingLabelBanner.php40960644editdlrm
ShippingLabelBannerDisplayRules.php53020644editdlrm
SiteHealth.php23700644editdlrm
Survey.php7680644editdlrm
SystemStatusReport.php59830644editdlrm
Translations.php122410644editdlrm
WCAdminAssets.php167570644editdlrm
WCAdminSharedSettings.php15320644editdlrm
WCAdminUser.php41750644editdlrm
WcPayWelcomePage.php159270644editdlrm
Edit: /home/suroeste/public_html/wp-content/plugins/woocommerce/src/Internal/Admin/Marketing.php (6405B)
connect_page( [ 'id' => 'woocommerce-marketing', 'title' => 'Marketing', 'capability' => 'manage_woocommerce', 'path' => 'wc-admin&path=/marketing', ] ); } /** * Registers report pages. */ public function register_pages() { $this->register_overview_page(); $controller = PageController::get_instance(); $defaults = [ 'parent' => 'woocommerce-marketing', 'existing_page' => false, ]; $marketing_pages = apply_filters( 'woocommerce_marketing_menu_items', [] ); foreach ( $marketing_pages as $marketing_page ) { if ( ! is_array( $marketing_page ) ) { continue; } $marketing_page = array_merge( $defaults, $marketing_page ); if ( $marketing_page['existing_page'] ) { $controller->connect_page( $marketing_page ); } else { $controller->register_page( $marketing_page ); } } } /** * Register the main Marketing page, which is Marketing > Overview. * * This is done separately because we need to ensure the page is registered properly and * that the link is done properly. For some reason the normal page registration process * gives us the wrong menu link. */ protected function register_overview_page() { global $submenu; // First register the page. PageController::get_instance()->register_page( [ 'id' => 'woocommerce-marketing-overview', 'title' => __( 'Overview', 'woocommerce' ), 'path' => 'wc-admin&path=/marketing', 'parent' => 'woocommerce-marketing', 'nav_args' => array( 'parent' => 'woocommerce-marketing', 'order' => 10, ), ] ); // Now fix the path, since register_page() gets it wrong. if ( ! isset( $submenu['woocommerce-marketing'] ) ) { return; } foreach ( $submenu['woocommerce-marketing'] as &$item ) { // The "slug" (aka the path) is the third item in the array. if ( 0 === strpos( $item[2], 'wc-admin' ) ) { $item[2] = 'admin.php?page=' . $item[2]; } } } /** * Order marketing menu items alphabeticaly. * Overview should be first, and Coupons should be second, followed by other marketing menu items. * * @return void */ public function reorder_marketing_submenu() { global $submenu; if ( ! isset( $submenu['woocommerce-marketing'] ) ) { return; } $marketing_submenu = $submenu['woocommerce-marketing']; $new_menu_order = array(); // Overview should be first. $overview_key = array_search( 'Overview', array_column( $marketing_submenu, self::SUBMENU_NAME_KEY ), true ); if ( false === $overview_key ) { /* * If Overview is not found we may be on a site witha different language. * We can use a fallback and try to find the overview page by its path. */ $overview_key = array_search( 'admin.php?page=wc-admin&path=/marketing', array_column( $marketing_submenu, self::SUBMENU_LOCATION_KEY ), true ); } if ( false !== $overview_key ) { $new_menu_order[] = $marketing_submenu[ $overview_key ]; array_splice( $marketing_submenu, $overview_key, 1 ); } // Coupons should be second. $coupons_key = array_search( 'Coupons', array_column( $marketing_submenu, self::SUBMENU_NAME_KEY ), true ); if ( false === $coupons_key ) { /* * If Coupons is not found we may be on a site witha different language. * We can use a fallback and try to find the coupons page by its path. */ $coupons_key = array_search( 'edit.php?post_type=shop_coupon', array_column( $marketing_submenu, self::SUBMENU_LOCATION_KEY ), true ); } if ( false !== $coupons_key ) { $new_menu_order[] = $marketing_submenu[ $coupons_key ]; array_splice( $marketing_submenu, $coupons_key, 1 ); } // Sort the rest of the items alphabetically. usort( $marketing_submenu, function( $a, $b ) { return strcmp( $a[0], $b[0] ); } ); $new_menu_order = array_merge( $new_menu_order, $marketing_submenu ); $submenu['woocommerce-marketing'] = $new_menu_order; //phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited } /** * Add settings for marketing feature. * * @param array $settings Component settings. * @return array */ public function component_settings( $settings ) { // Bail early if not on a wc-admin powered page. if ( ! PageController::is_admin_page() ) { return $settings; } $settings['marketing']['installedExtensions'] = InstalledExtensions::get_data(); return $settings; } }