/** * External dependencies */ import apiFetch from '@wordpress/api-fetch'; import { __, _n, sprintf } from '@wordpress/i18n'; import { Component } from '@wordpress/element'; import { TextControl, ToggleControl } from '@wordpress/components'; /** * Internal dependencies */ import SubmitButton from '../../shared/submit-button'; class SubscriptionEdit extends Component { state = { subscriberCountString: '', }; componentDidMount() { // Get the subscriber count so it is available right away if the user toggles the setting this.get_subscriber_count(); } render() { const { attributes, className, isSelected, setAttributes } = this.props; const { subscribePlaceholder, showSubscribersTotal } = attributes; if ( isSelected ) { return (
{ this.state.subscriberCountString }
}