403Webshell
Server IP : 172.67.158.161  /  Your IP : 3.129.70.113
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/giankuin/khowordpress.com/wp-content/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/giankuin/khowordpress.com/wp-content/plugins/woocommerce/src/Internal/Features/ProductBlockEditor/ProductTemplates/DownloadableProductTrait.php
<?php
/**
 * DownloadableProductTrait
 */

namespace Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates;

use Automattic\WooCommerce\Admin\Features\Features;
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\GroupInterface;

/**
 * Downloadable Product Trait.
 */
trait DownloadableProductTrait {
	/**
	 * Adds downloadable blocks to the given parent block.
	 *
	 * @param GroupInterface $parent_block The parent block.
	 */
	private function add_downloadable_product_blocks( $parent_block ) {
		// Downloads section.
		if ( Features::is_enabled( 'product-virtual-downloadable' ) ) {
			$product_downloads_section_group = $parent_block->add_section(
				array(
					'id'             => 'product-downloads-section-group',
					'order'          => 50,
					'attributes'     => array(
						'blockGap' => 'unit-40',
					),
					'hideConditions' => array(
						array(
							'expression' => 'postType === "product" && editedProduct.type !== "simple"',
						),
					),
				)
			);

			$product_downloads_section_group->add_block(
				array(
					'id'         => 'product-downloadable',
					'blockName'  => 'woocommerce/product-checkbox-field',
					'order'      => 10,
					'attributes' => array(
						'property' => 'downloadable',
						'label'    => __( 'Include downloads', 'woocommerce' ),
					),
				)
			);

			$product_downloads_section_group->add_subsection(
				array(
					'id'             => 'product-downloads-section',
					'order'          => 20,
					'attributes'     => array(
						'title'       => __( 'Downloads', 'woocommerce' ),
						'description' => sprintf(
							/* translators: %1$s: Downloads settings link opening tag. %2$s: Downloads settings link closing tag. */
							__( 'Add any files you\'d like to make available for the customer to download after purchasing, such as instructions or warranty info. Store-wide updates can be managed in your %1$sproduct settings%2$s.', 'woocommerce' ),
							'<a href="' . admin_url( 'admin.php?page=wc-settings&tab=products&section=downloadable' ) . '" target="_blank" rel="noreferrer">',
							'</a>'
						),
					),
					'hideConditions' => array(
						array(
							'expression' => 'editedProduct.downloadable !== true',
						),
					),
				)
			)->add_block(
				array(
					'id'        => 'product-downloads',
					'blockName' => 'woocommerce/product-downloads-field',
					'order'     => 10,
				)
			);
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit