protected function render_rules_json() {
		$rules = $this->get_rules();

		if ( empty( $rules ) ) {
			return;
		}

		$rules = $this->conditional->prepare_rules( $rules, $this );

		papi_render_html_tag( 'script', [
			'data-papi-rule-source-slug' => $this->html_name(),
			'data-papi-rules'            => 'true',
			'type'                       => 'application/json',
			papi_maybe_json_encode( $rules )
		] );
	}
protected function render_rules_json() {
		$rules = $this->get_rules();

		if ( empty( $rules ) ) {
			return;
		}

		$rules = $this->conditional->prepare_rules( $rules, $this );

		papi_render_html_tag( 'script', [
			'data-papi-rule-source-slug' => $this->html_name(),
			'data-papi-rules'            => 'true',
			'type'                       => 'application/json',
			papi_maybe_json_encode( $rules )
		] );
	}
protected function render_rules_json ( ) { $ rules = $ this -> get_rules ( ) ; if ( empty ( $ rules ) ) { return ; } $ rules = $ this -> conditional -> prepare_rules ( $ rules , $ this ) ; papi_render_html_tag ( 'script' , [ 'data-papi-rule-source-slug' => $ this -> html_name ( ) , 'data-papi-rules' => 'true' , 'type' => 'application/json' , papi_maybe_json_encode ( $ rules ) ] ) ; }
Render Conditional rules as script tag with JSON.
Render Conditional rules as script tag with JSON .