'none'`: it is never opened from a dock tile, because * "the customer window" with no customer means nothing. It is always * opened with a `customerId` param from a tile, a menu, or a session * restore. * * @return void */ function openstation_my_wordpress_woo_customer_window_register() { if ( ! openstation_my_wordpress_woo_active() ) { return; } if ( ! function_exists( 'openstation_register_window' ) ) { return; } if ( true !== openstation_my_wordpress_woo_customers_permission() ) { return; } $args = array( 'title' => __( 'Customer', 'desktop-mode' ), 'icon' => 'dashicons-businessperson', 'template' => 'openstation_my_wordpress_woo_customer_window_template', // Rides the integration bundle that already ships the // summary transport and the panel renderers — one more // window, no second bundle. 'script' => 'os-my-wordpress-woocommerce', 'style' => 'os-my-wordpress-woocommerce', 'width' => 880, 'height' => 700, 'min_width' => 520, 'min_height' => 420, 'placement' => 'none', 'config' => array( 'restRoot' => esc_url_raw( rest_url( 'desktop-mode/v1/woocommerce/' ) ), 'restNonce' => wp_create_nonce( 'wp_rest' ), ), ); /** * Filter the Customer window's registration args. * * **Status: Experimental** * * @param array $args `openstation_register_window()` args. */ $args = (array) apply_filters( 'openstation_my_wordpress_woo_customer_window_args', $args ); $registered = openstation_register_window( 'desktop-mode-woo-customer', $args ); if ( is_wp_error( $registered ) ) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log error_log( '[openstation] Customer window registration failed: ' . $registered->get_error_message() ); } } add_action( 'init', 'openstation_my_wordpress_woo_customer_window_register', 25 );