current_product(); if ( '' === $product ) { return; } Markup::out( self::html( $registry, $product ) ); } /** * The whole chrome of a product (escaped here). * * @param Registry $registry The registry. * @param string $slug Product slug. */ public static function html( Registry $registry, string $slug ): string { $product = $registry->product( $slug ); if ( null === $product ) { return ''; } $visible = $registry->visible( $slug ); $selected = Personas::selected( get_current_user_id(), $product ); // Two siblings directly in #wpcontent: a sticky box sticks only within its parent, and #wpcontent is the page. return self::topbar( $registry, $product ) . '