attributes = $attributes; $this->block = $block; } /** * Render the price name. * * @return void */ public function renderPriceName() { $this->block_html .= ''; } /** * Render the price amount, trial and setup fee. * * @return void */ public function renderPriceAmountScratchAmountTrialAndSetupFee() { $text_color = $this->attributes['textColor'] ?? '#8a8a8a'; $this->block_html .= ''; $this->block_html .= '
'; $this->block_html .= ''; $this->block_html .= '
'; $this->block_html .= ''; $this->block_html .= ''; $this->block_html .= ''; $this->block_html .= '
'; $this->block_html .= ''; $this->block_html .= ''; $this->block_html .= ''; $this->block_html .= '
'; $this->block_html .= ''; } /** * Render the price choices. * * @return void */ public function renderPriceChoices() { $choices_attributes = array( 'label' => $this->attributes['label'] ?? __( 'Pricing', 'surecart' ), ); $template_attributes = array( 'layout' => [ 'type' => 'flex', 'justifyContent' => 'left', 'flexWrap' => 'nowrap', 'orientation' => 'horizontal', ], 'textColor' => $this->attributes['textColor'] ?? 'black', 'backgroundColor' => $this->attributes['backgroundColor'] ?? 'white', 'style' => $this->attributes['style'] ?? [], ); $this->block_html .= ''; $this->block_html .= ''; $this->renderPriceName(); if ( $this->attributes['show_price'] ) { $this->renderPriceAmountScratchAmountTrialAndSetupFee(); } $this->block_html .= ''; $this->block_html .= ''; } /** * Render blocks. * * @return string */ public function doBlocks() { return do_blocks( $this->block_html ); } /** * Render the product price choices. * * @return string */ public function render() { $this->renderPriceChoices(); return $this->doBlocks(); } }