customerId( 'test' ) ) ) { $output .= ''; } // show live. if ( ! empty( User::current()->customerId( 'live' ) ) ) { $output .= ''; } // show for non-customers. if ( empty( $output ) ) { $output .= ''; } return $output; } public function show() { $back = add_query_arg( [ 'tab' => $this->getTab() ], remove_query_arg( array_keys( $_GET ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended ob_start(); ?> index( [ 'title' => esc_html__( 'Payment Methods', 'surecart' ) ], '' ); ?> preview( [ 'title' => esc_html__( 'Billing Details', 'surecart' ) ], '' ); ?> $this->getTab() ], remove_query_arg( array_keys( $_GET ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended $id = $this->getId(); if ( ! current_user_can( 'edit_sc_customer', $id, [] ) ) { wp_die( 'You are not allowed to edit this customer', 'surecart' ); } ob_start(); ?> find( $id ); if ( ! $customer ) { return; } echo wp_kses_post( Component::tag( 'sc-customer-edit' ) ->id( 'customer-customer-edit-live' ) ->with( [ 'header' => __( 'Update Billing Details', 'surecart' ), 'customer' => $customer, 'successUrl' => esc_url_raw( $back ), ] )->render() ); ?>