HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/views.tar
rendering-methods/modal/footer.php000064400000001742151534401500013267 0ustar00<?php
/**
 * Rendering methods Modal footer
 *
 * @var string $preview_url          The preview url including the query arg to switch in preview mode
 * @var string $convert_to_react_url The url to convert the rendering method in react mode
 *
 * @package YITH\Wishlist\Views\Modal
 */

?>

<a id="yith-wcwl-rendering-method-react-preview" class="yith-plugin-fw__button--secondary yith-plugin-fw__button--xl" href="<?php echo esc_attr( $preview_url ); ?>" target="_blank">
	<?php esc_html_e( 'Preview your site in a new tab', 'yith-woocommerce-wishlist' ); ?>
</a>
<a id="yith-wcwl-rendering-method-convert-to-react" class="yith-plugin-fw__button--primary yith-plugin-fw__button--xl" href="<?php echo esc_html( $convert_to_react_url ) ?>">
	<?php esc_html_e( 'Convert PHP templates to React', 'yith-woocommerce-wishlist' ); ?>
</a>
<a id="yith-wcwl-rendering-method-close-modal" href="#">
	<?php esc_html_e( "No, thanks, I'll wait until the next update", 'yith-woocommerce-wishlist' ); ?>
</a>
rendering-methods/react-only-option-notice.php000064400000001172151534401500015534 0ustar00<?php
/**
 * View for react-only option notice
 */

?>

<span class="yith-wcwl-react-only-option__notice">
	<?php echo yith_wcwl_kses_icon( yith_wcwl_get_icon( 'warning-triangle' ) ); ?>
	<p>
		<?php
		echo wp_kses_post( sprintf(
		// translators: %1$s is the placeholder for the HTML opening tag to hyperlink the text; %2$s is the placeholder for the HTML closing tag to hyperlink the text;
			__( 'This option is available only in the new React templates. %1$s Convert your templates now to unlock all the new features > %2$s', 'yith-woocommerce-wishlist' ),
			'<a role="button" tabindex="0">',
			'</a>'
		) );
		?>
	</p>
</span>
archie-loading.php000064400000006527151534405700010141 0ustar00<div class="om-archie-loading">
	<svg height="100%" width="100%" version="1.1" viewBox="0 0 50 50">
		<circle cx="25" cy="25" r="23" fill="none" />
		<path
			d="M12.75 27.84c.3.06.83.12 1.07.42l.12.11c.36-.05.72-.05 1.08-.11-.18-.12-.36-.24-.54-.3-.36-.6-.9-.72-1.61-.78V27c-1.32-.06-2.94-.36-3.66-1.2-.84-.9-.96-2.46-.84-3.66A4.7 4.7 0 0110 18.91c.54-.36 1.44-.06 1.5.66.06.3.12 1.38.36 1.5.3.18.84.24 1.38.24a8.83 8.83 0 011.73-1.32c-.96-.12-1.91.12-2.93.24l.84-.84a15.24 15.24 0 018.03-3.54c-1.26-.54-2.64-.78-3.96-1.08 5.1-1.07 11.63-1.5 16.24 2.52 1.2 1.02 2.16 2.4 2.81 4.02.72.11 1.68.11 2.16-.18.3-.18.36-1.2.36-1.5.06-.66.96-1.02 1.5-.66.96.72 1.5 2.04 1.62 3.17.12 1.2 0 2.76-.84 3.66-.72.84-2.28 1.14-3.6 1.2v.18c-.71 0-1.31.18-1.67.78-.18.06-.36.18-.54.3.36.06.78.11 1.14.11 0-.05.06-.11.12-.11.23-.3.77-.36 1.07-.42h.24c.12-.36.48-.78.96-.66s.96.66 1.02 1.08c.72.3 1.5.77 1.68 1.73a17.55 17.55 0 01-2.15 3.67 4 4 0 01-.6.17c-.13 0-.25.06-.3.06v.86c-.28.31-.57.6-.87.9.02-.67.02-1.35.02-2-.18-.12-.36-.3-.54-.48a1.72 1.72 0 01-1.01-.6c-.12-.3.12-.48.42-.66 0-.06-.06-.12-.06-.18a1.21 1.21 0 01-.48-.24 31.57 31.57 0 01-6.9 5.1c1.65.5 3.24 1.1 4.8 1.83-.37.2-.74.4-1.12.57a25.37 25.37 0 00-4.7-1.87c-.9.42-1.85.78-2.81 1.02-.12.06-.12.06-.3 0-.78-.24-1.56-.54-2.34-.9A29 29 0 0017.7 39c-.38-.17-.76-.36-1.12-.56 1.5-.73 3.04-1.34 4.62-1.8a26.15 26.15 0 01-6.48-5.15c-.12.06-.36.18-.53.24 0 .06 0 .12-.07.18.3.18.55.42.42.66-.11.3-.6.48-1.01.6-.12.18-.36.3-.54.42v2.24c-.38-.35-.74-.72-1.08-1.1v-.84c-.12 0-.18 0-.3-.06a4.24 4.24 0 01-.57-.16 17.6 17.6 0 01-2.18-3.7 2.7 2.7 0 011.67-1.71c.06-.42.54-.96 1.02-1.08.48-.12.84.3.96.66h.24zm1.73 2.21c2.94 3.12 6.18 5.7 10.37 7.07 4.5-1.25 7.67-4.01 10.84-7.13-.3-.12-.6-.36-.53-.6 0-.06.06-.12.06-.18l-1.74-.18c-.66 2.22-2.4 3.54-3.12 2.1-.18-.36-.24-.78-.3-1.14-.24.54-.9.54-1.61.6-.9.06-2.1.06-2.94-.18-.18.84-.72.84-1.8.96-.96.06-3.23.3-3.65-.72-.06 1.92-2.34.66-3-.48-.24-.36-.36-.78-.48-1.2l-1.56.18c.06.06.06.12.06.18 0 .42-.24.6-.6.72zm16.24.54c.06.42.18.48.6.3 1.08-.54 1.5-2.63 1.56-3.77-.84-.06-1.74-.06-2.64-.06.24 1.14.3 2.33.48 3.53zm-11.92.24c.36.18.6.18.66-.3.12-.6.18-2.45.3-3.47-.84 0-1.62.06-2.46.12-.3 1.32.06 3 1.5 3.65zM24.55 27c-1.32 0-2.58 0-3.83.06-.12.6-.3 3.23.11 3.41.84.36 2.76.36 3.66.12.24-.18.12-3.05.06-3.6zm.9 0c0 .3 0 2.51.3 2.7.72.35 2.64.3 3.41.05.36-.12.18-2.45.12-2.81-1.26 0-2.57 0-3.83.06zm-11.2-4.92c-.37.06-.67.18-1.02.3l-.84.36a5.36 5.36 0 00-.36 3.54c.3.06.6.06.84.06.18-1.5.66-2.94 1.37-4.26zm22.94-.06h-.78c.48 1.38.84 2.82.96 4.32.24 0 .48 0 .78-.06.42-1.62 0-3.42-.96-4.26zm-25.7 4.14a5.3 5.3 0 01.84-4.2c-.3-.06-.72-.18-.96-.36-1.26.36-1.86 1.8-1.98 3.24.12.18.18.36.3.48.42.42 1.08.66 1.8.84zm27.26 0a3.34 3.34 0 001.74-.78c.12-.12.24-.3.3-.48-.06-1.44-.66-2.82-1.98-3.24-.24.24-.6.3-.96.36.9.96 1.14 2.7.9 4.14zm-18.63-5.63a5.09 5.09 0 1010.18 0 5.04 5.04 0 00-5.09-5.04 5.08 5.08 0 00-5.1 5.04zm5.15-1.62c-.48 0-.96.06-1.38.24.6.18 1.08.78 1.08 1.44 0 .83-.72 1.55-1.68 1.55-.6 0-1.14-.3-1.44-.78-.06.24-.06.48-.06.78 0 1.8 1.56 3.24 3.42 3.24 1.92 0 3.47-1.44 3.47-3.24.06-1.8-1.5-3.23-3.41-3.23zm-14.2 2.22c-.06-.18-.18-.54-.18-.96 0-.42-.48-.54-.96-.06-.78.78-.96 2.7-.9 3.41.3-.9.9-1.92 2.04-2.4zm28.04 0a3.78 3.78 0 012.04 2.4c.06-.73-.18-2.64-.9-3.42-.48-.48-.96-.36-.96.06s-.12.78-.18.96zm-16.78-7.67c1.68-3.72 8.15-3.24 8.4 1.55-2.34-2.63-5.4-3.17-8.4-1.55z"
			fill="#858b98"
		/>
	</svg>
</div>
constantcontact.php000064400000022321151534405700010466 0ustar00<style type="text/css">
	.omapi-constant-contact #wpcontent {
		padding: 0;
	}
	.omapi-constant-contact #wpbody {
		background: #fff;
		padding-left: 40px;
		padding-right: 40px;
	}

	.notice {
		display: none;
	}

	.om-cc-wrap {
		max-width: 970px;
	}

	.om-cc-wrap h1 {
		/*color: #1a5285;*/
		font-size: 30px;
		margin: 0 0 15px 0;
	}

	.om-cc-wrap h2 {
		/*color: #1a5285;*/
		font-size: 26px;
		margin: 0 0 15px 0;
		text-align: left;
	}

	.om-cc-wrap p {
		font-size: 16px;
		font-weight: 300;
		color: #333;
		margin: 1.2em 0;
	}

	.om-cc-wrap ul,
	.om-cc-wrap ol {
		margin: 1.6em 2.5em 2em;
		line-height: 1.5;
		font-size: 16px;
		font-weight: 300;
	}

	.om-cc-wrap ul {
		list-style: disc;
	}

	.om-cc-wrap li {
		margin-bottom: 0.8em;
	}

	.om-cc-wrap hr {
		margin: 2.2em 0;
	}

	.om-cc-wrap .logo {
		float: right;
		margin-top: 0.8em;
		border: 1px solid #ddd;
	}

	.om-cc-wrap .reasons {
		margin: 2.2em 400px 2.2em 2em;
	}

	.om-cc-wrap .reasons li {
		margin-bottom: 1.4em;
	}

	.om-cc-wrap .steps {
		clear: both;
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-ms-flex-wrap: wrap;
		    flex-wrap: wrap;
	}

	.om-cc-wrap .step {
		-webkit-box-flex: 1;
		    -ms-flex-positive: 1;
		        flex-grow: 1;
		-ms-flex-negative: 1;
		    flex-shrink: 1;
		margin-bottom: 1.4em;
		padding: 0 1em 0 0;
		-ms-flex-preferred-size: 50%;
		    flex-basis: 50%;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
	}

	.om-cc-wrap .step a {
		-webkit-box-shadow: rgba(0, 35, 60, 0.1) 3px 7px 13px 0px;
		box-shadow: rgba(0, 35, 60, 0.1) 3px 7px 13px 0px;
		border: 1px solid #efefef;
		display: block;
	}

	.om-cc-wrap .step a:hover {
		border-color: #d9d9d9;
	}

	.om-cc-wrap .step img {
		max-width: 100%;
		height: auto;
		display: block;
	}

	.om-cc-wrap .dashicons-yes {
		color: #19BE19;
		font-size: 26px;
	}

	.om-cc-wrap .button {
		background-color: #0078C3;
		border: 1px solid #005990;
		border-radius: 4px;
		color: #fff;
		font-size: 16px;
		font-weight: 600;
		height: auto;
		line-height: 1;
		margin-bottom: 10px;
		padding: 14px 30px;
		text-align: center;
	}

	.om-cc-wrap .button:hover,
	.om-cc-wrap .button:focus {
		background-color: #005990;
		color: #fff
	}

	@media only screen and (max-width: 767px) {
		.om-cc-wrap h1 {
			font-size: 26px;
		}

		.om-cc-wrap h2 {
			font-size: 22px;
		}

		.om-cc-wrap p {
			font-size: 14px;
		}

		.om-cc-wrap ul,
		.om-cc-wrap ol {
			font-size: 14px;
		}

		.om-cc-wrap .logo {
			width: 120px;
		}

		.om-cc-wrap .reasons {
			margin-right: 150px;
		}
	}
</style>
<div class="wrap omapi-page om-cc-wrap">
	<h1><?php esc_html_e( 'Grow Your Website with OptinMonster + Email Marketing', 'optin-monster-api' ); ?></h1>
	<p><?php esc_html_e( 'Wondering if email marketing is really worth your time?', 'optin-monster-api' ); ?></p>
	<p><?php echo wp_kses( __( 'Email is hands-down the most effective way to nurture leads and turn them into customers, with a return on investment (ROI) of <strong>$44 back for every $1 spent</strong> according to the Direct Marketing Association.', 'optin-monster-api' ), array( 'strong' => array() ) ); ?></p>
	<p><?php esc_html_e( 'Here are 3 big reasons why every smart business in the world has an email list:', 'optin-monster-api' ); ?></p>
	<a href="<?php echo esc_url( $data['signup_url'] ); ?>" target="_blank" rel="noopener noreferrer">
		<img width="350" class="logo" src="<?php echo esc_url( $data['images_url'] .'constant-contact-OM.png' ); ?>" alt="<?php esc_attr_e( 'OptinMonster with Constant Contact - Try us free', 'optin-monster-api' ); ?>"/>
	</a>
	<ol class="reasons">
		<li><?php echo wp_kses( __( '<strong>Email is still #1</strong> - At least 91% of consumers check their email on a daily basis. You get direct access to your subscribers, without having to play by social media&#39;s rules and algorithms.', 'optin-monster-api' ), array( 'strong' => array() ) ); ?></li>
		<li><?php echo wp_kses( __( '<strong>You own your email list</strong> - Unlike with social media, your list is your property and no one can revoke your access to it.', 'optin-monster-api' ), array( 'strong' => array() ) ); ?></li>
		<li><?php echo wp_kses( __( '<strong>Email converts</strong> - People who buy products marketed through email spend 138% more than those who don&#39;t receive email offers.', 'optin-monster-api' ), array( 'strong' => array() ) ); ?></li>
	</ol>
	<p><?php esc_html_e( 'That&#39;s why it&#39;s crucial to start collecting email addresses and building your list as soon as possible.', 'optin-monster-api' ); ?></p>
	<p>
		<?php
		printf(
			wp_kses(
				/* translators: %s - WPBeginners.com Guide to Email Lists URL. */
				__( 'For more details, see this guide on <a href="%s" target="_blank" rel="noopener noreferrer">why building your email list is so important</a>.', 'optin-monster-api' ),
				array(
					'a' => array(
						'href'   => array(),
						'target' => array(),
						'rel'    => array(),
					),
				)
			),
			'https://optinmonster.com/beginners-guide-to-email-marketing/'
		);
		?>
	</p>
	<hr/>
	<h2><?php esc_html_e( 'You&#39;ve Already Started - Here&#39;s the Next Step (It&#39;s Easy)', 'optin-monster-api' ); ?></h2>
	<p><?php esc_html_e( 'Here are the 3 things you need to build an email list:', 'optin-monster-api' ); ?></p>
	<ol>
		<li><?php esc_html_e( 'A Website or Blog', 'optin-monster-api' ); ?> <span class="dashicons dashicons-yes"></span></li>
		<?php // TODO: update the following line ?>
		<li><?php esc_html_e( 'High-Converting Form Builder', 'optin-monster-api' ); ?> <span class="dashicons dashicons-yes"></span></li>
		<li><strong><?php esc_html_e( 'The Best Email Marketing Service', 'optin-monster-api' ); ?></strong></li>
	</ol>
	<p><?php esc_html_e( 'With a powerful email marketing service like Constant Contact, you can instantly send out mass notifications and beautifully designed newsletters to engage your subscribers.', 'optin-monster-api' ); ?></p>
	<p>
		<a href="<?php echo esc_url( $data['signup_url'] ); ?>" class="button" target="_blank" rel="noopener noreferrer">
			<?php esc_html_e( 'Get Started with Constant Contact for Free', 'optin-monster-api' ); ?>
		</a>
	</p>
	<p><?php esc_html_e( 'OptinMonster plugin makes it fast and easy to capture all kinds of visitor information right from your WordPress site - even if you don&#39;t have a Constant Contact account.', 'optin-monster-api' ); ?></p>
	<p><?php esc_html_e( 'But when you combine OptinMonster with Constant Contact, you can nurture your contacts and engage with them even after they leave your website. When you use Constant Contact + OptinMonster together, you can:', 'optin-monster-api' ); ?></p>
	<ul>
		<li><?php esc_html_e( 'Seamlessly add new contacts to your email list', 'optin-monster-api' ); ?></li>
		<li><?php esc_html_e( 'Create and send professional email newsletters', 'optin-monster-api' ); ?></li>
		<li><?php esc_html_e( 'Get expert marketing and support', 'optin-monster-api' ); ?></li>
	</ul>
	<p>
		<a href="<?php echo esc_url( $data['signup_url'] ); ?>" target="_blank" rel="noopener noreferrer">
			<strong><?php esc_html_e( 'Try Constant Contact Today', 'optin-monster-api' ); ?></strong>
		</a>
	</p>
	<hr/>
	<h2><?php esc_html_e( 'OptinMonster Makes List Building Easy', 'optin-monster-api' ); ?></h2>
	<p><?php esc_html_e( 'When creating OptinMonster, our goal was to make a conversion optimization tool that was both EASY and POWERFUL.', 'optin-monster-api' ); ?></p>
	<p><?php esc_html_e( 'Here&#39;s how it works.', 'optin-monster-api' ); ?></p>
	<div class="steps">
		<div class="step1 step">
			<a href="<?php echo esc_url( $data['images_url'] . 'om-step-1.png' ); ?>"><img src="<?php echo esc_url( $data['images_url'] . 'om-step-1-sm.png' ); ?>"></a>
			<p><?php esc_html_e( '1. Select a design from our beautiful, high-converting template library.', 'optin-monster-api' ); ?></p>
		</div>
		<div class="step2 step">
			<a href="<?php echo esc_url( $data['images_url'] . 'om-step-2.png' ); ?>"><img src="<?php echo esc_url( $data['images_url'] . 'om-step-2-sm.png' ); ?>"></a>
			<p><?php esc_html_e( '2. Drag and drop elements to completely customize the look and feel of your campaign.', 'optin-monster-api' ); ?></p>
		</div>
		<div class="step3 step">
			<a href="<?php echo esc_url( $data['images_url'] . 'om-step-3.png' ); ?>"><img src="<?php echo esc_url( $data['images_url'] . 'om-step-3-sm.png' ); ?>"></a>
			<p><?php esc_html_e( '3. Connect your Constant Contact email list.', 'optin-monster-api' ); ?></p>
		</div>
		<div class="step4 step">
			<a href="<?php echo esc_url( $data['images_url'] . 'om-step-4.png' ); ?>"><img src="<?php echo esc_url( $data['images_url'] . 'om-step-4-sm.png' ); ?>"></a>
			<p><?php esc_html_e( '4. Sync your campaign to your WordPress site, then hit Go Live.', 'optin-monster-api' ); ?></p>
		</div>
	</div>
	<p><?php esc_html_e( 'It doesn&#39;t matter what kind of business you run, what kind of website you have, or what industry you are in - you need to start building your email list today.', 'optin-monster-api' ); ?></p>
	<p><?php esc_html_e( 'With Constant Contact + OptinMonster, growing your list is easy.', 'optin-monster-api' ); ?></p>
	<p>
		<a href="<?php echo esc_url( $data['signup_url'] ); ?>" target="_blank" rel="noopener noreferrer">
			<strong><?php esc_html_e( 'Try Constant Contact Today', 'optin-monster-api' ); ?></strong>
		</a>
	</p>
</div>
coupon-metabox.php000064400000015626151534405700010233 0ustar00<?php
/**
 * Product Education Metabox for WooCommerce Coupon Pages
 *
 * @since 2.1.0
 */

$svgpath = plugin_dir_path( OMAPI_FILE ) . '/assets/images/icons/';
?>
<div class="omapi-metabox has-slides">
	<nav class="omapi-metabox__nav">
		<ul>
			<li>
				<a href="#omapi-sticky-bar" title="Sticky Bar" class="active">
					<?php include $svgpath . 'sticky-bar.svg'; ?>
					<?php esc_html_e( 'Sticky Bar', 'optin-monster-api' ); ?>
				</a>
			</li>
			<li>
				<a href="#omapi-popup" title="Popup">
					<?php include $svgpath . 'popup.svg'; ?>
					<?php esc_html_e( 'Popup', 'optin-monster-api' ); ?>
				</a>
			</li>
			<li>
				<a href="#omapi-gamified" title="Gamified">
					<?php include $svgpath . 'gamified.svg'; ?>
					<?php esc_html_e( 'Gamified Spin to Win', 'optin-monster-api' ); ?>
				</a>
			</li>
		</ul>
	</nav>
	<div class="omapi-metabox__content">
		<div class="omapi-metabox__slides">
			<div class="omapi-metabox__slides-slide active" id="omapi-sticky-bar">
				<div class="omapi-metabox__tab omapi-metabox__tab-coupon">
					<div class="omapi-metabox__tab-icon omapi-metabox__tab-icon-coupon">
						<img src="<?php echo esc_url( $this->url . 'assets/images/metabox/sticky-bar.svg' ); ?>">
					</div>
					<div class="omapi-metabox__tab-content">
						<p><strong>
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'Did you know that creating a sticky bar to promote your coupon can help you increase sales?', 'optin-monster-api' ); ?>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_title'] ); ?>
							<?php endif; ?>
						</strong></p>
						<p class="secondary">
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'See how one store owner added $23,700 in 5 months with a coupon promoted by an OptinMonster sticky bar.', 'optin-monster-api' ); ?>
								<a href="https://optinmonster.com/freemium-software-company-unlocked-7000-anonymous-leads-using-popups/?utm_source=WordPress&utm_medium=WooCouponMetabox&utm_campaign=Plugin" class="omapi-metabox__arrow-after omapi-metabox__link-style" target="_blank" rel="noopener"><?php esc_html_e( 'View Case Study', 'optin-monster-api' ); ?></a>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_message'] ); ?>
							<?php endif; ?>
						</p>
						<div class="omapi-button-wrap">
							<?php if ( $data['has_sites'] ) : ?>
								<a href="admin.php?page=optin-monster-templates&type=floating" class="button button-primary omapi-metabox__arrow-after button-large" target="_blank" rel="noopener"><?php esc_html_e( 'Create a Sticky Bar Campaign', 'optin-monster-api' ); ?></a>
								<a href="admin.php?page=optin-monster-campaigns" class="button button-secondary button-large" target="_blank" rel="noopener"><?php esc_html_e( 'View Existing Campaigns', 'optin-monster-api' ); ?></a>
							<?php else : ?>
								<?php $this->output_view( 'not-connected-buttons.php' ); ?>
							<?php endif; ?>
						</div>
					</div>
				</div>
			</div>
			<div class="omapi-metabox__slides-slide" id="omapi-popup">
				<div class="omapi-metabox__tab omapi-metabox__tab-coupon">
					<div class="omapi-metabox__tab-icon omapi-metabox__tab-icon-coupon">
						<img src="<?php echo esc_url( $this->url . 'assets/images/metabox/popup.svg' ); ?>">
					</div>
					<div class="omapi-metabox__tab-content">
						<p><strong>
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'Encourage purchases with a coupon popup!', 'optin-monster-api' ); ?>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_title'] ); ?>
							<?php endif; ?>
						</strong></p>
						<p class="secondary">
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'See how this store owner increased revenue by 300% using an OptinMonster coupon popup.', 'optin-monster-api' ); ?>
								<a href="https://optinmonster.com/case-study-how-win-in-health-used-optinmonster-to-increase-revenue-by-300/?utm_source=WordPress&utm_medium=WooCouponMetabox&utm_campaign=Plugin" class="omapi-metabox__arrow-after omapi-metabox__link-style" target="_blank" rel="noopener"><?php esc_html_e( 'View Case Study', 'optin-monster-api' ); ?></a>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_message'] ); ?>
							<?php endif; ?>
						</p>
						<div class="omapi-button-wrap">
							<?php if ( $data['has_sites'] ) : ?>
								<a href="admin.php?page=optin-monster-templates&type=popup" class="button button-primary omapi-metabox__arrow-after button-large" target="_blank" rel="noopener"><?php esc_html_e( 'Create a Popup Campaign', 'optin-monster-api' ); ?></a>
								<a href="admin.php?page=optin-monster-campaigns" class="button button-secondary button-large" target="_blank" rel="noopener"><?php esc_html_e( 'View Existing Campaigns', 'optin-monster-api' ); ?></a>
							<?php else : ?>
								<?php $this->output_view( 'not-connected-buttons.php' ); ?>
							<?php endif; ?>
						</div>
					</div>
				</div>
			</div>
			<div class="omapi-metabox__slides-slide" id="omapi-gamified">
			<div class="omapi-metabox__tab omapi-metabox__tab-coupon">
					<div class="omapi-metabox__tab-icon omapi-metabox__tab-icon-coupon">
						<img src="<?php echo esc_url( $this->url . 'assets/images/metabox/gamified.svg' ); ?>">
					</div>
					<div class="omapi-metabox__tab-content">
						<p><strong>
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'Gamified coupon wheels work! Create one for your store and watch sales grow!', 'optin-monster-api' ); ?>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_title'] ); ?>
							<?php endif; ?>
						</strong></p>
						<p class="secondary">
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'Learn how to create a gamified coupon wheel popup yourself with our step-by-step tutorial.', 'optin-monster-api' ); ?>
								<a href="https://optinmonster.com/coupon-wheel-campaign/?utm_source=WordPress&utm_medium=WooCouponMetabox&utm_campaign=Plugin" class="omapi-metabox__arrow-after omapi-metabox__link-style" target="_blank" rel="noopener"><?php esc_html_e( 'View the Tutorial', 'optin-monster-api' ); ?></a>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_message'] ); ?>
							<?php endif; ?>
						</p>
						<div class="omapi-button-wrap">
							<?php if ( $data['has_sites'] ) : ?>
								<a href="admin.php?page=optin-monster-templates&type=gamified" class="button button-primary omapi-metabox__arrow-after button-large" target="_blank" rel="noopener"><?php esc_html_e( 'Create a Gamified Campaign', 'optin-monster-api' ); ?></a>
								<a href="admin.php?page=optin-monster-campaigns" class="button button-secondary button-large" target="_blank" rel="noopener"><?php esc_html_e( 'View Existing Campaigns', 'optin-monster-api' ); ?></a>
							<?php else : ?>
								<?php $this->output_view( 'not-connected-buttons.php' ); ?>
							<?php endif; ?>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
disable-warning-css.php000064400000001645151534405700011123 0ustar00<?php
/**
 * CSS to override default message for
 *
 * @since 2.2.0
 */

if ( empty( $data->labels->singular_name ) ) {
	return;
}

$message = sprintf(
	/* translators: %s - The name of the post-type being edited. */
	esc_attr__( 'OptinMonster campaigns have been disabled for this %s', 'optin-monster-api' ),
	$data->labels->singular_name
);

$message2 = sprintf(
	/* translators: %s - The name of the post-type being edited. */
	esc_attr__( 'Campaigns disabled for this %s', 'optin-monster-api' ),
	$data->labels->singular_name
);

/*
 * Double selectors added for extra specificity (instead of using !important)
 */
?>
body.om-campaigns-disabled.om-campaigns-disabled [data-type="optinmonster/campaign-selector"]:before {
	content: '<?php echo esc_attr( $message ); ?>';
}
body.om-campaigns-disabled.om-campaigns-disabled .om-format-popover .components-popover__content:after {
	content: '<?php echo esc_attr( $message2 ); ?>';
}
inline-campaign-shortcode-modal.php000064400000002423151534405700013377 0ustar00<?php
if ( empty( $data['campaigns']['inline'] ) ) {
	echo '<p>';
	printf(
		wp_kses(
			/* translators: %s - OptinMonster Templates page. */
			__( 'Whoops, you haven\'t created an inline campaign yet. Want to <a href="%s">give it a go</a>?', 'optin-monster-api' ),
			array(
				'a' => array(
					'href' => array(),
				),
			)
		),
		esc_url( $data['templatesUri'] . '&type=inline' )
	);
	echo '</p>';

	return;
}

printf( '<p><label for="optin-monster-modal-select-inline-campaign">%s</label></p>', esc_html__( 'Select and display your email marketing form or smart call-to-action campaign', 'optin-monster-api' ) );
echo '<select id="optin-monster-modal-select-inline-campaign">';
foreach ( $data['campaigns']['inline'] as $slug => $name ) {
	printf( '<option value="%s">%s</option>', esc_attr( $slug ), esc_html( $name ) );
}
echo '</select>';
echo '<p class="optin-monster-modal-notice">';
printf(
	wp_kses( /* translators: %s - OptinMonster documentation URL. */
		__( 'Or <a href="%s" target="_blank" rel="noopener noreferrer">create a new inline campaign</a> to embed in this post', 'optin-monster-api' ),
		array(
			'a' => array(
				'href'   => array(),
				'rel'    => array(),
				'target' => array(),
			),
		)
	),
	esc_url( $data['templatesUri'] . '&type=inline' )
);
echo '</p>';
install-plugin-form.php000064400000002500151534405700011161 0ustar00<?php
wp_enqueue_script( 'om-plugin-install-js', $this->url . 'assets/dist/js/plugininstall.min.js', array( 'jquery' ), $this->asset_version() );
OMAPI_Utils::add_inline_script(
	'om-plugin-install-js',
	'OMAPI_Plugins',
	array(
		'restUrl'     => rest_url(),
		'pluginData'  => $data['plugin'],
		'actionNonce' => wp_create_nonce( 'om_plugin_action_nonce' ),
		'restNonce'   => wp_create_nonce( 'wp_rest' ),
	)
);
?>
<style>
	#om-plugin-alerts {
		display: none;
		margin-bottom: 15px !important;
		padding: 10px !important;
	}
	#om-plugin-alerts p {
		margin-bottom: 10px !important;
	}
</style>
<div class="notice notice-error" id="om-plugin-alerts"></div>
<form class="install-plugin-form" action="<?php echo esc_url( $data['plugin_search_url'] ); ?>" method="post" >
	<?php if ( ! empty( $data['plugin']['installed'] ) ) : ?>
		<button type="submit" id="activateButton" class="button button-primary button-activate" data-actiontext="<?php esc_attr_e( 'Activating...', 'optin-monster-api' ); ?>">
			<?php echo esc_html( $data['button_activate'] ); ?>
		</button>
	<?php else : ?>
		<button type="submit" id="installButton" class="button button-primary button-install" data-actiontext="<?php esc_attr_e( 'Installing...', 'optin-monster-api' ); ?>">
			<?php echo esc_html( $data['button_install'] ); ?>
		</button>
	<?php endif; ?>
</form>
jiggle-css.php000064400000001227151534405700007312 0ustar00<style type="text/css">
	.om-notifications-count:not(.count-0) {
		animation-duration: 10s;
		animation-timing-function: ease-out;
		animation-delay: 3s;
		animation-iteration-count: infinite;
		animation-direction: normal;
		animation-fill-mode: both;
		animation-play-state: running;
		animation-name: omjiggle;
	}
	@keyframes omjiggle {
		<?php // these percentages cause the animation to occur for 1s, followed by 9s pause ?>
		1%, 9% {
			transform: translate3d(-1px, 0, 0);
		}

		2%, 8% {
			transform: translate3d(2px, 0, 0);
		}

		3%, 5%, 7% {
			transform: translate3d(-3px, 0, 0);
		}

		4%, 6% {
			transform: translate3d(3px, 0, 0);
		}
	}
</style>
logo.svg000064400000112117151534405700006234 0ustar00<svg class="omapi-svg-logo" width="100%" height="100%" viewBox="0 0 716 112" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M565.437,342.797C565.437,343.888 564.892,344.524 563.711,344.707C561.166,345.071 547.717,345.071 545.355,344.616C544.174,344.344 543.54,343.526 543.54,342.162C543.54,338.891 543.903,328.168 543.903,324.897C543.903,322.354 543.63,313.993 543.63,311.447C543.63,305.905 541.268,303.179 536.451,303.179C533.543,303.179 527.546,306.541 527.546,309.813L527.546,342.526C527.546,343.889 526.91,344.616 525.635,344.799C523,345.161 510.097,345.072 507.735,344.708C506.462,344.525 505.827,343.798 505.827,342.709L505.917,314.176C505.917,304.089 505.099,296.183 503.555,290.458C503.372,289.64 503.281,288.459 504.371,288.187C506.916,287.914 510.277,287.46 514.549,286.823C520.999,285.551 524.544,284.916 525.361,284.916C526.544,284.916 526.272,293.094 527.451,293.094C527.906,293.094 529.178,291.731 533.994,288.914C538.81,286.097 542.992,284.733 546.536,284.733C556.35,284.733 565.164,289.548 565.164,299.998C565.164,311.63 565.164,318.809 565.255,331.167C565.255,336.44 565.346,340.346 565.346,342.981L565.437,342.797ZM605.785,295.545C605.785,295.908 605.51,296.453 604.875,297.18C599.967,295.908 592.516,297.453 592.516,303.45C592.516,308.72 604.421,313.358 604.421,325.352C604.421,329.35 602.695,334.984 599.697,337.436C593.699,342.525 584.975,346.795 577.251,346.795C575.343,346.795 567.619,333.892 567.619,332.165C567.619,331.802 567.891,331.62 568.255,331.529C571.071,330.984 573.98,330.439 576.796,329.984C580.342,328.802 582.158,326.986 582.158,324.351C582.158,322.533 581.158,320.534 579.07,318.171C575.344,314.082 573.434,311.901 573.254,311.629C562.803,296.088 580.615,281.277 597.063,281.277C598.607,281.277 605.695,294.272 605.695,295.453L605.785,295.545ZM652.946,326.804C652.946,328.714 652.038,335.8 652.038,337.71C652.038,340.073 651.765,340.162 649.675,341.345C644.496,344.16 638.679,345.615 632.319,345.615C620.596,345.615 614.781,341.162 614.781,332.166C614.781,327.716 615.417,312.631 615.417,308.086C615.417,303.272 608.42,307.27 608.42,303.815C608.42,302.725 608.693,298.908 608.693,297.909C608.693,296.454 608.42,291.547 608.42,290.185C608.42,289.367 609.692,288.913 612.328,288.821C613.782,288.821 614.599,288.367 614.69,287.64C614.962,286.095 615.053,283.642 614.962,280.371C614.781,275.191 614.69,273.192 614.69,272.919C614.69,268.194 615.145,265.922 616.053,265.922C617.78,265.922 624.049,267.376 625.504,267.557C627.592,267.83 630.683,268.284 634.864,268.739C635.864,268.83 636.408,269.193 636.408,269.738C636.408,272.464 635.589,281.734 635.589,284.46C635.589,286.459 636.137,287.458 637.317,287.458C639.679,287.458 647.767,287.094 650.222,287.094C651.13,287.094 651.584,287.368 651.584,288.004C651.584,289.821 650.947,294.547 650.947,296.364L651.039,304.815C651.039,305.633 650.494,306.087 649.311,306.087C645.132,305.996 640.863,305.905 636.68,305.905C636.044,305.905 635.772,306.814 635.772,308.54L635.864,317.173C635.864,323.534 636.679,326.805 643.405,326.805C647.222,326.805 652.946,323.718 652.946,326.716L652.946,326.804ZM690.476,307.903C690.476,299.906 680.572,294.727 675.119,301.633C673.575,303.632 672.847,305.904 672.847,308.63C672.847,309.719 673.392,310.266 674.575,310.266C677.573,310.266 682.208,309.811 688.568,308.902C689.931,308.719 690.568,308.358 690.568,307.903L690.476,307.903ZM711.74,311.629C711.74,315.719 710.379,318.079 707.742,318.626C707.289,318.717 703.107,319.171 695.202,319.989C690.385,320.534 683.298,321.17 673.847,321.898C675.575,330.166 689.295,331.712 697.836,326.714C699.381,325.714 700.927,324.804 702.471,323.804C704.289,324.715 709.741,335.163 709.741,337.073C709.741,337.346 709.469,337.798 708.834,338.437C703.926,343.706 696.292,346.342 685.842,346.342C666.759,346.342 653.492,334.256 653.492,315.08C653.492,296.726 665.124,283.003 683.844,283.003C691.567,283.003 698.201,285.82 703.653,291.545C709.103,297.179 711.83,303.903 711.83,311.717L711.74,311.629ZM752.813,306.813C752.813,309.902 749.363,309.175 746.816,308.995C743.092,308.72 738.639,308.72 736.64,310.447C735.457,311.446 734.822,313.629 734.822,316.808C734.822,319.718 735.005,329.714 735.005,332.62C735.005,334.528 735.459,341.161 735.459,343.07C735.459,344.07 734.822,344.615 733.46,344.706C729.552,345.069 719.376,345.069 715.287,344.615C713.923,344.434 713.288,343.797 713.288,342.615L713.377,313.537C713.377,303.995 712.469,296.181 710.743,290.092C710.56,289.274 710.469,288.184 711.56,288.002C713.832,287.73 717.012,287.275 721.375,286.639C727.735,285.367 731.097,284.731 731.279,284.731C733.097,284.731 732.37,292.364 733.733,292.364C734.278,292.364 734.821,291.274 738.731,289.184C742.637,287.093 746.364,286.003 749.906,286.003C752.177,286.003 753.268,286.457 753.268,287.457C753.268,288.638 753.177,290.274 752.905,292.455C752.268,298.361 752.632,301.815 752.632,306.813L752.813,306.813ZM404.505,342.344C404.505,343.706 403.869,344.524 402.687,344.706C400.236,345.069 386.967,345.069 384.515,344.615C383.333,344.343 382.698,343.343 382.698,341.616C382.698,338.437 383.061,328.075 383.061,324.987C383.061,317.899 382.97,312.901 382.788,309.902C382.516,305.086 380.244,302.724 375.973,302.724C372.156,302.724 367.613,306.54 367.159,310.447C366.977,312.174 366.886,317.08 366.886,325.352C366.886,328.531 367.249,339.436 367.249,342.708C367.249,344.071 366.704,344.707 365.523,344.707L347.166,344.707C346.077,344.707 345.44,343.889 345.44,342.253C345.44,338.983 345.804,328.351 345.804,325.081C345.804,322.534 345.531,313.994 345.531,311.447C345.531,296.546 329.72,304.178 329.72,309.54L329.81,342.436C329.81,344.524 329.628,344.616 327.539,344.797C323.177,345.159 315.816,345.159 310.273,344.707C308.274,344.524 308.274,344.524 308.274,342.436L308.365,313.358C308.365,306.723 307.91,299.272 306.911,291.002C306.729,290.003 306.548,288.913 307.638,288.549C309.637,287.731 316.725,287.368 318.088,287.094C319.451,286.822 325.358,285.005 327.629,285.005C329.447,285.005 328.538,293.547 329.356,293.456C331.81,292.819 337.535,284.551 349.439,284.551C356.526,284.551 363.796,287.913 365.704,294.819C369.976,289.003 378.335,284.551 385.515,284.551C395.69,284.551 404.234,289.548 404.234,300.18C404.234,303.815 403.871,315.901 403.871,319.535C403.871,323.807 404.234,338.255 404.234,342.526L404.505,342.344Z" style="fill:white;fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M79.096,314.536C79.096,308.448 75.098,302.45 68.465,302.45C58.559,302.45 54.379,315.445 60.558,322.988C66.738,330.529 79.096,326.35 79.096,314.536M145.432,315.081C145.432,303.359 132.619,298.815 126.713,306.63C121.806,313.173 123.714,327.35 134.709,327.35C141.798,327.349 145.432,323.26 145.432,315.081M167.878,315.173C167.878,332.165 156.973,345.523 139.525,345.523C132.801,345.523 124.441,340.889 124.714,340.889C124.168,340.889 123.896,341.524 123.896,342.707C123.896,346.342 124.532,357.7 124.532,361.335C124.532,362.607 123.896,363.243 122.533,363.243C119.443,363.243 106.993,363.515 104.813,362.971C103.631,362.698 102.995,361.971 102.995,360.699L103.087,313.991C103.087,304.54 102.359,296.635 100.996,290.183C100.814,289.365 100.724,288.274 101.632,287.911C104.904,286.639 116.445,284.913 120.079,284.913C123.805,284.913 122.442,291.182 123.623,291.182C123.169,291.182 124.986,290.092 128.803,287.911C132.71,285.729 136.163,284.64 139.344,284.64C157.245,284.64 167.968,297.453 167.968,315.081L167.878,315.173ZM214.221,326.622C214.221,329.258 213.313,334.982 213.313,337.526C213.313,339.709 213.131,339.98 210.95,341.161C205.771,343.978 199.955,345.434 193.594,345.434C181.871,345.434 176.056,340.981 176.056,331.985C176.056,327.35 176.692,312.538 176.692,307.904C176.692,302.997 169.695,307.177 169.695,303.634C169.695,302.543 169.967,298.726 169.967,297.726C169.967,296.273 169.695,291.366 169.695,290.002C169.695,289.184 170.967,288.73 173.602,288.64C175.056,288.64 175.874,288.185 175.965,287.458C176.238,285.913 176.328,283.46 176.238,280.188C176.056,275.009 175.965,272.464 175.965,272.737C175.965,268.012 176.419,265.74 177.328,265.74C179.509,265.74 184.507,267.103 186.779,267.376C188.868,267.648 191.958,268.102 196.138,268.557C197.138,268.648 197.683,269.012 197.683,269.557C197.683,272.646 196.865,281.188 196.865,284.277C196.865,286.277 197.41,287.276 198.592,287.276C200.954,287.276 209.042,286.913 211.496,286.913C212.404,286.913 212.858,287.185 212.858,287.822C212.858,289.639 212.222,294.364 212.222,296.182L212.313,304.633C212.313,305.451 211.768,305.905 210.587,305.905C206.225,305.814 202.318,305.723 197.956,305.723C197.32,305.723 197.047,306.632 197.047,308.359L197.138,316.991C197.138,323.352 198.047,326.624 204.68,326.624C208.951,326.624 214.221,323.441 214.221,326.532L214.221,326.622ZM237.757,316.535C237.757,321.533 238.12,337.89 238.12,342.888C238.12,343.706 237.575,344.251 236.575,344.434C233.759,344.887 220.764,344.979 217.947,344.434C217.038,344.251 216.493,343.98 216.312,343.616C216.039,343.071 216.584,318.719 216.584,316.537C216.584,305.087 216.13,295.909 215.221,289.094C214.857,286.095 215.585,286.277 221.946,287.004C230.124,287.822 231.487,286.731 237.757,286.731C239.484,286.731 239.211,287.822 239.12,289.094C238.212,296.998 237.757,306.086 237.757,316.535M239.302,271.464C239.302,278.46 235.304,282.005 227.398,282.005C214.857,282.005 212.04,269.464 219.129,263.739C226.58,257.742 239.302,261.831 239.302,271.464M304.366,342.615C304.366,343.706 303.821,344.343 302.639,344.523C300.095,344.887 286.646,344.887 284.283,344.434C283.102,344.16 282.466,343.344 282.466,341.98C282.466,338.71 282.829,327.987 282.829,324.716C282.829,322.17 282.556,313.809 282.556,311.266C282.556,305.723 280.194,302.997 275.378,302.997C272.288,302.997 266.472,306.45 266.472,309.631L266.472,342.345C266.472,343.708 265.836,344.434 264.564,344.616C261.565,344.979 249.479,344.979 246.662,344.524C245.39,344.344 244.754,343.616 244.754,342.525L244.845,313.994C244.845,303.907 244.027,296.001 242.482,290.276C242.301,289.368 242.301,288.277 243.3,288.005C245.845,287.732 249.207,287.277 253.478,286.641C259.93,285.369 263.473,284.733 264.292,284.733C265.472,284.733 265.2,292.912 266.382,292.912C265.928,292.912 268.108,291.549 272.924,288.732C277.741,285.915 281.921,284.552 285.465,284.552C295.279,284.552 304.093,289.368 304.093,299.818C304.093,311.449 304.093,318.629 304.184,330.987C304.184,336.257 304.275,340.163 304.275,342.799L304.366,342.615ZM98.907,314.536C98.907,332.983 86.73,345.614 68.192,345.614C50.381,345.614 37.659,333.165 37.659,315.264C37.659,296.726 49.2,283.64 68.192,283.64C86.548,283.64 98.907,296.181 98.907,314.536" style="fill:white;fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<g opacity="0.149002">
			<clipPath id="_clip1">
				<rect x="385.878" y="344.16" width="139.94" height="15.086"/>
			</clipPath>
			<g clip-path="url(#_clip1)">
				<path d="M455.848,344.16C494.47,344.16 525.819,347.522 525.819,351.704C525.819,355.884 494.469,359.246 455.848,359.246C417.228,359.246 385.879,355.884 385.879,351.704C385.878,347.522 417.228,344.16 455.848,344.16" style="fill:black;fill-rule:nonzero;"/>
			</g>
		</g>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M497.921,284.186C498.831,283.641 499.012,280.278 499.104,279.279C499.376,277.007 502.193,276.008 504.011,277.189C507.192,279.46 508.827,283.823 509.28,287.548C509.735,291.364 509.372,296.453 506.646,299.452C503.738,302.724 496.377,303.724 492.016,303.269C490.835,303.178 489.744,302.905 488.653,302.724L486.563,284.004L488.837,284.458C491.108,284.912 495.743,285.368 497.833,284.186L497.921,284.186Z" style="fill:rgb(153,153,102);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M505.009,280.551C504.464,279.824 503.828,279.097 503.101,278.643C502.374,278.097 501.011,278.552 500.918,279.461L500.829,280.096C502.193,279.642 503.737,280.006 505.009,280.551M507.554,293.364C508.099,290.456 507.826,287.093 506.827,284.186C506.1,283.277 505.372,282.551 504.009,282.005C502.282,281.278 501.374,281.551 500.559,282.278C500.467,283.005 500.283,283.55 500.104,284.095C504.829,285.64 506.828,290.183 507.555,293.454L507.555,293.364L507.554,293.364ZM493.741,286.639C492.106,286.639 490.379,286.457 488.653,286.094L490.287,301.178C492.471,301.633 495.013,301.633 497.284,301.361C498.92,295.545 497.284,288.73 493.651,286.549L493.741,286.639ZM498.83,285.64C498.195,286.003 497.283,286.276 496.196,286.457C499.466,289.911 500.466,296.181 499.282,301.088C502.009,300.543 504.28,299.543 505.462,298.271C505.735,297.998 505.916,297.634 506.19,297.362C506.19,292.182 504.1,286.639 499.102,285.549C499.01,285.64 499.01,285.64 498.918,285.64L498.83,285.64Z" style="fill:rgb(192,192,160);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M497.921,295.453C495.74,295.999 493.378,296.09 491.65,295.908C490.924,295.817 490.287,295.726 489.651,295.544L488.561,286.185C490.287,286.548 492.015,286.73 493.65,286.73C496.013,288.184 497.56,291.637 497.832,295.453L497.921,295.453ZM504.556,282.277C504.644,282.823 504.736,283.368 504.827,283.912C505.009,285.003 505.009,286.275 504.918,287.548C503.735,286.094 502.192,284.822 500.103,284.095C500.283,283.55 500.466,283.004 500.557,282.277C501.281,281.641 502.281,281.277 504.008,282.005C504.192,282.095 504.373,282.186 504.556,282.277M503.192,278.733C503.465,279.188 503.645,279.642 503.828,280.096C502.828,279.824 501.829,279.732 500.738,280.006L500.829,279.37C500.918,278.46 502.281,278.006 503.01,278.552L503.193,278.642L503.193,278.733L503.192,278.733ZM498.83,285.64C498.194,286.003 497.283,286.275 496.195,286.457C498.194,288.547 499.282,291.637 499.647,294.909C500.918,294.453 502.1,293.818 502.828,292.91C503.556,292.182 501.646,286.094 499.012,285.549C498.92,285.64 498.92,285.64 498.83,285.64" style="fill:rgb(251,250,196);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M412.685,284.186C411.774,283.641 411.594,280.278 411.501,279.279C411.229,277.007 408.412,276.008 406.595,277.189C403.413,279.46 401.779,283.823 401.325,287.548C400.871,291.364 401.234,296.453 403.96,299.452C406.868,302.724 414.228,303.724 418.59,303.269C419.771,303.178 420.862,302.905 421.953,302.724L424.042,284.004L421.769,284.458C419.498,284.912 414.863,285.368 412.773,284.186L412.685,284.186Z" style="fill:rgb(153,153,102);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M405.597,280.551C406.142,279.824 406.778,279.097 407.504,278.643C408.232,278.097 409.595,278.552 409.688,279.461L409.776,280.096C408.413,279.642 406.868,280.006 405.597,280.551M403.051,293.364C402.507,290.456 402.78,287.093 403.779,284.186C404.506,283.277 405.233,282.551 406.596,282.005C408.323,281.278 409.232,281.551 410.047,282.278C410.139,283.005 410.323,283.55 410.502,284.095C405.777,285.64 403.778,290.183 403.05,293.454L403.05,293.364L403.051,293.364ZM416.865,286.639C418.5,286.639 420.227,286.457 421.953,286.094L420.318,301.178C418.135,301.633 415.592,301.633 413.321,301.361C411.685,295.545 413.321,288.73 416.955,286.549L416.865,286.639ZM411.776,285.64C412.411,286.003 413.323,286.276 414.41,286.457C411.139,289.911 410.14,296.181 411.323,301.088C408.597,300.543 406.326,299.543 405.143,298.271C404.87,297.998 404.69,297.634 404.416,297.362C404.416,292.182 406.506,286.639 411.504,285.549C411.595,285.64 411.595,285.64 411.688,285.64L411.776,285.64Z" style="fill:rgb(192,192,160);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M412.685,295.453C414.866,295.999 417.228,296.09 418.955,295.908C419.682,295.817 420.318,295.726 420.954,295.544L422.044,286.185C420.318,286.548 418.591,286.73 416.956,286.73C414.593,288.184 413.048,291.637 412.774,295.453L412.685,295.453ZM406.05,282.277C405.961,282.823 405.87,283.368 405.778,283.912C405.597,285.003 405.597,286.275 405.689,287.548C406.87,286.094 408.414,284.822 410.503,284.095C410.323,283.55 410.14,283.004 410.048,282.277C409.324,281.641 408.325,281.277 406.598,282.005C406.414,282.095 406.233,282.186 406.05,282.277M407.414,278.733C407.141,279.188 406.961,279.642 406.778,280.096C407.777,279.824 408.777,279.732 409.868,280.006L409.776,279.37C409.688,278.46 408.325,278.006 407.596,278.552L407.413,278.642L407.413,278.733L407.414,278.733ZM411.776,285.64C412.412,286.003 413.323,286.275 414.411,286.457C412.412,288.547 411.323,291.637 410.959,294.909C409.688,294.453 408.505,293.818 407.777,292.91C407.051,292.182 408.96,286.094 411.594,285.549C411.685,285.64 411.685,285.64 411.776,285.64" style="fill:rgb(251,250,196);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M422.77,280.551C419.59,280.278 416.499,280.914 413.41,281.369L416.136,278.733C418.773,276.189 422.316,273.917 425.681,272.281C430.677,269.737 436.403,267.829 442.126,267.284C438.126,265.557 433.583,264.739 429.314,263.739C445.763,260.287 466.843,259.014 481.929,271.827C490.563,279.188 495.287,292.819 495.287,305.177C495.287,351.796 415.866,351.796 415.866,305.177C415.866,298.907 417.41,292.91 420.319,287.457C419.229,287.73 418.229,288.093 417.136,288.548L412.323,290.547L415.773,286.639C417.864,284.277 420.227,282.278 422.953,280.733L422.77,280.551Z" style="fill:rgb(142,212,30);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M458.393,266.193C466.118,267.101 473.659,269.646 479.927,275.007C487.56,281.459 491.65,293.454 491.65,304.268C491.65,324.076 475.293,334.346 458.392,334.891L458.392,266.193L458.393,266.193Z" style="fill:rgb(112,169,27);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M429.131,276.28C435.129,272.281 444.944,271.009 456.758,271.646C454.668,269.193 452.76,267.647 449.943,266.284C455.304,266.102 459.574,267.284 470.206,270.919C461.03,265.557 449.763,263.104 439.22,264.285C443.036,265.375 446.671,267.102 450.033,269.374C439.22,268.193 426.769,273.372 421.771,277.643C425.044,277.28 427.95,277.915 431.042,279.279C426.68,280.823 423.862,282.187 421.135,284.822C425.86,282.459 429.586,280.46 435.584,279.188C433.221,278.37 431.949,276.916 429.131,276.28" style="fill:rgb(161,225,65);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M455.483,265.284C466.39,265.284 475.203,273.826 475.203,284.458C475.203,294.999 466.39,303.632 455.483,303.632C444.58,303.632 435.767,295.09 435.767,284.458C435.765,273.917 444.58,265.284 455.483,265.284" style="fill:rgb(112,169,27);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M424.225,302.36C424.861,301.178 484.654,300.724 485.836,302.36C487.924,305.086 486.745,307.721 485.836,309.993L424.225,309.993C423.68,307.539 422.771,304.904 424.225,302.36" style="fill:rgb(112,169,27);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M425.043,304.086C425.679,302.541 483.926,301.905 485.108,304.086C487.107,307.811 485.925,311.446 485.108,314.536L425.043,314.536C424.497,311.173 423.68,307.63 425.043,304.086" style="fill:rgb(75,113,19);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M473.477,264.467C472.66,248.928 451.758,247.292 446.307,259.469C455.939,254.198 465.752,256.107 473.477,264.467" style="fill:rgb(112,169,27);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M461.845,251.563C455.759,250.654 449.125,253.29 446.399,259.377C450.033,257.378 453.76,256.47 457.303,256.47C458.031,255.107 459.757,252.472 461.938,251.563L461.845,251.563Z" style="fill:rgb(133,197,31);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M455.483,263.285C465.297,263.285 473.204,271.191 473.204,281.005C473.204,290.819 465.297,298.725 455.483,298.725C445.671,298.725 437.766,290.819 437.766,281.005C437.766,271.191 445.67,263.285 455.483,263.285" style="fill:rgb(211,232,239);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M444.308,267.829C450.214,262.922 458.484,262.922 462.663,268.011C466.843,273.009 465.39,281.096 459.483,286.094C453.575,291.001 445.307,291.001 441.125,285.912C436.947,280.914 438.402,272.827 444.308,267.829" style="fill:white;fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M455.938,275.008C462.844,275.008 468.388,280.188 468.388,286.639C468.388,293.091 462.842,298.271 455.938,298.271C449.034,298.271 443.489,293.091 443.489,286.639C443.489,280.188 449.033,275.008 455.938,275.008" style="fill:rgb(13,130,223);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M455.938,275.008C459.3,275.008 462.39,276.28 464.571,278.279C463.754,281.096 462.027,283.913 459.482,286.094C454.575,290.183 448.034,290.82 443.58,288.093C443.489,287.639 443.489,287.185 443.489,286.639C443.489,280.188 449.033,275.008 455.938,275.008" style="fill:rgb(3,153,237);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M455.938,279.188C460.3,279.188 463.935,282.55 463.935,286.639C463.935,290.729 460.391,294.09 455.938,294.09C451.577,294.09 447.942,290.729 447.942,286.639C447.942,282.55 451.485,279.188 455.938,279.188" style="fill:rgb(35,35,35);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M455.938,279.188C458.755,279.188 461.209,280.551 462.663,282.55C461.844,283.822 460.754,285.003 459.482,286.003C456.209,288.73 452.21,289.911 448.668,289.638C448.214,288.73 447.942,287.639 447.942,286.548C447.942,282.459 451.485,279.097 455.938,279.097L455.938,279.188Z" style="fill:rgb(50,50,50);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M448.941,275.644C452.212,275.644 454.847,278.098 454.847,281.187C454.847,284.277 452.212,286.731 448.941,286.731C445.67,286.731 443.035,284.277 443.035,281.187C443.035,278.098 445.67,275.644 448.941,275.644" style="fill:white;fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M414.138,308.448C441.581,304.359 469.117,304.722 496.56,308.448C498.559,322.805 497.468,336.438 496.56,350.157C469.117,351.248 441.581,351.431 414.138,350.157C412.502,336.255 412.322,322.351 414.138,308.448" style="fill:rgb(156,174,179);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M422.044,347.341C444.308,348.157 466.481,348.069 488.743,347.341C480.747,342.796 472.75,338.437 463.754,335.983C460.844,337.346 457.757,338.437 454.667,339.345C454.212,339.435 454.212,339.435 453.758,339.345C451.212,338.527 448.669,337.527 446.214,336.438C437.49,338.981 429.585,342.707 421.952,347.433L422.044,347.341ZM416.773,313.173C415.592,324.169 415.773,335.255 416.956,346.25C424.953,341.253 433.494,337.254 442.489,334.438C432.13,328.986 424.86,321.17 416.773,313.173M491.65,310.993C467.389,308.083 443.035,307.811 418.773,310.993C428.768,322.168 439.766,331.348 454.396,336.162C469.933,331.712 480.655,321.988 491.65,310.993M493.741,346.25C494.469,335.255 495.195,324.26 494.014,313.265C485.837,321.353 477.112,329.076 466.934,334.436C476.385,337.253 485.201,341.435 493.834,346.249L493.741,346.249L493.741,346.25Z" style="fill:rgb(211,232,239);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M422.044,347.341C432.765,347.705 443.487,347.886 454.303,347.886L454.303,339.345C454.212,339.345 454.122,339.345 453.849,339.253C451.305,338.438 448.762,337.437 446.307,336.346C437.583,338.89 429.678,342.615 422.044,347.341M416.773,313.173C415.592,324.169 415.773,335.255 416.956,346.25C424.953,341.253 433.494,337.254 442.489,334.438C432.13,328.986 424.86,321.17 416.773,313.173M454.303,308.72C442.399,308.72 430.586,309.447 418.773,310.994C428.679,322.17 439.766,331.258 454.303,336.163L454.303,308.72Z" style="fill:white;fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M438.855,315.264C438.765,315.627 438.583,315.992 438.403,316.355C438.219,316.9 437.856,317.443 437.403,317.807C436.312,318.625 434.95,318.354 433.766,317.898C431.131,316.807 429.315,314.172 428.223,311.628C426.952,308.718 426.86,306.63 427.587,303.449C445.943,302.45 464.754,302.268 482.564,303.358L482.564,303.449L482.838,303.449C483.111,306.539 482.838,307.811 482.112,310.358C481.293,313.265 479.565,316.807 476.659,318.17C475.568,318.717 474.296,318.989 473.296,318.261C472.843,317.898 472.481,317.353 472.206,316.807C471.57,315.808 471.39,314.356 471.207,313.264C470.844,313.991 470.39,314.445 469.662,314.626C468.481,314.899 467.118,315.079 465.936,315.171C464.755,315.263 463.485,315.355 462.21,315.355C460.302,315.355 458.211,315.171 456.396,314.628C456.124,315.719 455.669,316.716 454.579,317.079C453.398,317.443 451.943,317.626 450.671,317.718C449.308,317.807 447.945,317.899 446.673,317.899C444.583,317.899 442.22,317.718 440.312,316.9C439.584,316.627 439.128,316.081 438.858,315.355L438.858,315.264L438.855,315.264Z" style="fill:rgb(153,153,102);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M469.66,302.814C470.388,306.903 470.205,312.174 469.024,312.446C467.206,312.901 460.209,313.629 456.757,312.357C455.846,310.631 455.846,306.269 455.938,302.725C460.664,302.724 465.389,302.724 469.66,302.814M440.308,303.632C439.673,305.541 439.037,307.721 438.401,310.358C438.037,311.994 437.764,313.629 437.49,314.809C437.127,316.444 436.309,316.718 434.764,316.081C430.765,314.356 428.678,307.632 428.857,303.541C431.584,303.359 435.674,303.178 440.307,302.996C444.761,302.905 449.759,302.814 454.757,302.814C455.209,307.812 455.209,313.81 454.121,315.081C452.21,315.72 444.761,316.628 441.124,314.992C439.488,314.266 440.124,308.177 440.215,303.724L440.308,303.632ZM470.388,302.814C470.931,304.995 471.568,307.267 472.203,310.175C472.566,311.992 472.75,313.721 473.021,314.9C473.385,316.717 474.112,316.99 475.565,316.264C479.111,314.445 481.11,307.72 481.017,303.269C478.384,303.087 474.658,302.905 470.388,302.814" style="fill:rgb(192,192,160);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M455.938,305.268C460.209,305.268 464.482,305.268 468.388,305.358C469.024,307.631 469.024,311.72 466.297,312.719C463.39,312.993 459.209,313.082 456.756,312.174C456.121,310.901 455.938,308.084 455.938,305.268M440.217,305.54C444.125,305.449 448.578,305.358 453.031,305.358C453.483,308.63 454.302,315.173 450.213,315.536C447.214,315.809 443.489,315.809 441.125,314.809C439.765,314.173 439.945,309.63 440.126,305.631L440.217,305.54ZM429.041,306.086C430.949,305.904 433.492,305.812 436.49,305.722C436.854,305.722 437.581,314.718 437.581,314.718C437.217,316.354 436.4,316.627 434.855,315.991C431.674,314.628 429.675,310.082 429.129,306.176L429.041,306.086ZM473.022,314.9C473.385,316.717 474.113,316.99 475.566,316.264C478.476,314.809 480.292,310.083 480.838,305.995C479.112,305.812 477.022,305.722 474.566,305.631C473.113,306.722 472.839,314.264 473.022,314.9" style="fill:rgb(251,250,196);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M448.123,305.449C448.307,308.995 448.123,312.537 447.671,312.809C446.763,313.357 443.4,314.082 441.765,312.719C441.126,312.266 441.218,308.811 441.31,305.54C443.49,305.449 445.763,305.449 448.216,305.358L448.123,305.449ZM463.391,305.358C463.481,307.994 463.299,310.447 462.936,310.629C462.119,311.082 458.937,311.629 457.302,310.538C456.757,310.175 456.757,307.72 456.847,305.268L463.392,305.268L463.392,305.358L463.391,305.358ZM434.675,305.812C434.584,306.812 434.584,307.995 434.584,309.175L434.584,312.809C434.584,314.173 434.221,314.445 433.493,313.809C432.041,312.719 430.767,309.266 430.222,306.086C431.494,305.994 433.04,305.904 434.675,305.812M479.747,305.904C478.563,305.812 477.201,305.722 475.657,305.722C475.657,306.721 475.749,307.811 475.749,308.994L475.749,312.901C475.749,314.355 476.021,314.628 476.748,313.991C478.02,312.809 479.202,309.357 479.747,305.904" style="fill:white;fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M419.591,348.068C418.591,352.611 414.045,355.61 409.504,355.428C403.234,355.154 393.51,348.249 393.692,341.434C393.783,337.618 396.6,334.163 399.508,331.984C402.325,329.8 407.05,327.531 410.686,328.53C414.32,329.53 416.864,334.528 418.046,337.798C419.135,340.616 420.227,345.071 419.498,348.069L419.591,348.069L419.591,348.068Z" style="fill:rgb(133,197,31);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M418.046,347.613C418.135,347.068 418.228,346.522 418.228,345.886C417.047,340.888 414.229,335.164 411.049,334.256C406.142,332.8 396.238,339.344 396.781,346.069C399.508,350.249 405.325,353.702 409.504,353.882C413.32,354.065 417.228,351.519 418.047,347.703L418.047,347.613L418.046,347.613Z" style="fill:rgb(112,169,27);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M413.502,342.524C414.773,339.98 412.686,335.527 409.504,335.89C406.142,336.345 398.872,341.343 398.872,345.251C398.872,347.705 402.234,349.432 405.777,348.433C408.413,347.705 412.502,344.615 413.502,342.524M416.319,348.885C416.955,347.34 416.046,344.615 414.229,344.886C412.321,345.251 407.776,348.521 407.959,350.339C408.048,351.794 410.594,353.066 412.594,352.338C414.047,351.794 415.773,350.157 416.319,348.885" style="fill:rgb(93,141,23);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M408.504,330.712C408.595,332.348 405.414,333.8 404.142,332.62C403.051,330.529 403.326,327.985 404.233,327.44C405.233,326.895 407.687,327.895 408.504,330.712" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M402.325,333.711C402.686,335.526 400.235,337.073 399.052,336.255C397.508,334.71 396.964,331.984 397.688,331.348C398.417,330.712 401.052,331.712 402.325,333.711" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M397.69,338.254C398.238,339.436 397.054,341.071 395.691,340.981C394.239,339.89 392.876,337.346 393.419,336.709C393.965,335.983 396.419,336.709 397.69,338.254" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M420.953,321.352C421.681,319.989 419.682,319.078 418.046,318.442C416.408,317.898 415.592,317.898 414.956,319.261C414.228,320.624 413.865,322.713 415.592,323.258C417.227,323.804 420.317,322.713 421.045,321.35L420.953,321.35L420.953,321.352Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M422.408,316.264C422.59,317.808 420.407,318.626 418.592,318.99C416.865,319.354 416.137,319.171 415.957,317.626C415.773,316.079 416.229,313.628 418.047,313.265C419.771,312.902 422.225,314.718 422.408,316.264" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M422.77,311.174C422.955,312.629 420.771,313.358 418.956,313.721C417.229,314.082 416.501,313.902 416.321,312.358C416.136,310.903 416.593,308.632 418.319,308.268C420.047,307.904 422.499,309.631 422.682,311.083L422.77,311.174Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M408.504,307.812C408.776,308.996 411.048,308.72 412.775,308.36C414.501,307.905 415.138,307.541 414.774,306.36C414.501,305.178 413.41,303.543 411.687,303.997C409.96,304.451 408.233,306.633 408.504,307.905L408.504,307.812Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M406.96,322.261L407.504,323.805L406.323,322.897C405.776,322.442 405.324,321.806 404.96,321.079C405.049,321.806 405.142,322.262 405.324,322.897C403.598,320.079 402.051,316.99 403.05,312.902C403.961,309.175 407.687,307.448 410.322,306.722C411.957,306.268 413.773,305.995 415.408,306.177C416.408,306.268 418.135,306.54 418.862,307.448C419.589,308.36 419.953,310.266 420.134,311.538C420.406,313.537 420.317,315.627 420.045,317.626C419.771,319.442 419.227,321.17 418.318,322.624C417.591,323.715 416.772,324.532 415.684,324.988C414.409,325.532 413.137,325.623 411.773,325.351C409.958,324.988 408.322,323.897 406.867,322.352L406.96,322.261Z" style="fill:rgb(133,197,31);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M417.955,308.72C419.046,309.994 419.591,315.357 418.318,319.263C417.955,319.355 417.5,319.445 417.047,319.445C415.047,319.628 413.137,318.72 411.866,317.629C411.957,318.174 412.139,318.537 412.321,318.81C411.23,318.358 410.322,316.994 409.685,315.448C409.774,316.721 409.958,317.266 410.139,317.994C408.775,317.539 407.686,315.994 406.867,314.36C406.14,312.905 406.231,310.814 407.503,309.907C410.865,307.453 416.591,307.271 417.862,308.816L417.955,308.72Z" style="fill:rgb(161,225,65);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M491.106,348.068C492.105,352.611 496.648,355.61 501.193,355.428C507.462,355.154 517.185,348.249 517.002,341.434C516.914,337.618 514.094,334.163 511.188,331.984C508.371,329.8 503.644,327.531 500.01,328.53C496.377,329.53 493.832,334.528 492.65,337.798C491.559,340.616 490.469,345.071 491.198,348.069L491.106,348.069L491.106,348.068Z" style="fill:rgb(133,197,31);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M492.561,347.613C492.469,347.068 492.376,346.522 492.376,345.886C493.559,340.888 496.375,335.164 499.556,334.256C504.463,332.8 514.367,339.344 513.823,346.069C511.096,350.249 505.279,353.702 501.101,353.882C497.284,354.065 493.376,351.519 492.558,347.703L492.558,347.613L492.561,347.613Z" style="fill:rgb(112,169,27);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M497.194,342.524C495.92,339.98 498.01,335.527 501.193,335.89C504.555,336.345 511.824,341.343 511.824,345.251C511.824,347.705 508.462,349.432 504.918,348.433C502.282,347.705 498.194,344.615 497.194,342.524M494.377,348.885C493.741,347.34 494.649,344.615 496.467,344.886C498.375,345.251 502.917,348.521 502.737,350.339C502.646,351.794 500.102,353.066 498.102,352.338C496.648,351.794 494.922,350.157 494.377,348.885" style="fill:rgb(93,141,23);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M502.102,330.712C502.01,332.348 505.192,333.8 506.463,332.62C507.554,330.529 507.28,327.985 506.373,327.44C505.373,326.895 502.918,327.895 502.102,330.712" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M508.28,333.711C507.919,335.526 510.37,337.073 511.553,336.255C513.097,334.71 513.641,331.984 512.917,331.348C512.188,330.712 509.552,331.712 508.28,333.711" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M512.915,338.254C512.368,339.436 513.552,341.071 514.914,340.981C516.366,339.89 517.729,337.346 517.186,336.709C516.64,335.983 514.187,336.709 512.915,338.254" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M489.651,321.352C488.924,319.989 490.923,319.078 492.561,318.442C494.197,317.898 495.012,317.898 495.649,319.261C496.376,320.624 496.74,322.713 495.012,323.258C493.378,323.804 490.287,322.713 489.56,321.35L489.651,321.35L489.651,321.352Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M488.288,316.264C488.107,317.808 490.287,318.626 492.105,318.99C493.832,319.354 494.559,319.171 494.74,317.626C494.922,316.079 494.469,313.628 492.65,313.265C490.924,312.902 488.471,314.718 488.288,316.264" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M487.835,311.174C487.651,312.629 489.834,313.358 491.649,313.721C493.376,314.082 494.104,313.902 494.284,312.358C494.469,310.903 494.013,308.632 492.285,308.268C490.559,307.904 488.106,309.631 487.924,311.083L487.835,311.174Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M502.192,307.812C501.918,308.996 499.646,308.72 497.919,308.36C496.195,307.905 495.557,307.541 495.92,306.36C496.195,305.178 497.283,303.543 499.009,303.997C500.737,304.451 502.463,306.633 502.192,307.905L502.192,307.812Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M503.646,322.261L503.101,323.805L504.282,322.897C504.83,322.442 505.282,321.806 505.645,321.079C505.556,321.806 505.464,322.262 505.282,322.897C507.008,320.079 508.555,316.99 507.555,312.902C506.645,309.175 502.918,307.448 500.284,306.722C498.648,306.268 496.833,305.995 495.197,306.177C494.198,306.268 492.471,306.54 491.744,307.448C491.016,308.36 490.653,310.266 490.472,311.538C490.2,313.537 490.288,315.627 490.562,317.626C490.835,319.442 491.378,321.17 492.288,322.624C493.014,323.715 493.834,324.532 494.922,324.988C496.197,325.532 497.468,325.623 498.832,325.351C500.647,324.988 502.283,323.897 503.739,322.352L503.646,322.261Z" style="fill:rgb(133,197,31);fill-rule:nonzero;"/>
	</g>
	<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
		<path d="M492.65,308.72C491.559,309.994 491.014,315.357 492.287,319.263C492.65,319.355 493.105,319.445 493.558,319.445C495.558,319.628 497.467,318.72 498.739,317.629C498.647,318.174 498.466,318.537 498.284,318.81C499.375,318.358 500.283,316.994 500.919,315.448C500.83,316.721 500.646,317.266 500.466,317.994C501.83,317.539 502.918,315.994 503.738,314.36C504.464,312.905 504.374,310.814 503.102,309.907C499.74,307.453 494.014,307.271 492.743,308.816L492.65,308.72Z" style="fill:rgb(161,225,65);fill-rule:nonzero;"/>
	</g>
</svg>
monsterlink-campaign-shortcode-modal.php000064400000003637151534405700014476 0ustar00<?php
$monsterlinks_upsell = empty( $data['canMonsterlink'] );
if ( $monsterlinks_upsell ) {
	echo '<p id="om-monsterlink-upgrade">';
	printf(
		wp_kses(
			/* translators: %s - OptinMonster Templates page. */
			__( 'Unlock access to the OptinMonster click-to-load feature called <a href="%s" target="_blank" rel="noopener">MonsterLinks</a> by upgrading your subscription.', 'optin-monster-api' ),
			array(
				'a' => array(
					'href'   => array(),
					'target' => array(
						'_blank',
					),
					'rel'    => array(
						'noopener',
					),
				),
			)
		),
		esc_url( $data['upgradeUri'] )
	);
	echo '</p>';
	echo '<div style="display:none;">';
}

if ( ! empty( $data['campaigns']['other'] ) ) {
	printf( '<p><label for="optin-monster-modal-select-campaign">%s</label></p>', esc_html__( 'Select a Click to Load Campaign to link.', 'optin-monster-api' ) );
	echo '<select id="optin-monster-modal-select-campaign">';
	foreach ( $data['campaigns']['other'] as $slug => $name ) {
		printf( '<option value="%s">%s</option>', esc_attr( $slug ), esc_html( $name ) );
	}
	echo '</select>';
	echo '<p class="optin-monster-modal-notice">';
	printf(
		wp_kses( /* translators: %s - OptinMonster documentation URL. */
			__( 'Or <a href="%s" target="_blank" rel="noopener noreferrer">create a new Click to Load Campaign</a>.', 'optin-monster-api' ),
			array(
				'a' => array(
					'href'   => array(),
					'rel'    => array(),
					'target' => array(),
				),
			)
		),
		esc_url( $data['templatesUri'] . '&type=popup' )
	);
	echo '</p>';
} else {
	echo '<p>';
	printf(
		wp_kses(
			/* translators: %s - OptinMonster Templates page. */
			__( 'Whoops, you haven\'t created a popup campaign yet. Want to <a href="%s">give it a go</a>?', 'optin-monster-api' ),
			array(
				'a' => array(
					'href' => array(),
				),
			)
		),
		esc_url( $data['templatesUri'] . '&type=popup' )
	);
	echo '</p>';
}

if ( $monsterlinks_upsell ) {
	echo '</div>';
}
not-connected-buttons.php000064400000000757151534405700011526 0ustar00<?php
/**
 * Buttons used when site not connected.
 *
 * @since 2.3.0
 */
?>
<a href="<?php echo esc_url( OMAPI_Urls::wizard() ); ?>" class="button button-primary button-large" target="_blank" rel="noopener"><?php esc_html_e( 'Create a Free Account', 'optin-monster-api' ); ?></a>
<a href="<?php echo esc_url( OMAPI_Urls::settings() ); ?>" class="button button-secondary button-large" target="_blank" rel="noopener"><?php esc_html_e( 'Connect an Existing Account', 'optin-monster-api' ); ?></a>
plugin-banner.php000064400000002043151534405700010021 0ustar00<script src="//use.typekit.net/pef1xgi.js"></script>
<script>try{Typekit.load();}catch(e){}</script>
<div class="omapi-plugin-header" id="omwp-plugin-banner">
	<style>.omapi-svg-logo {width: 164px;margin-right: 13px;}</style>
	<div class="omapi-plugin-banner">
		<div class="omapi-plugin-banner__wrapper">
			<div class="omapi-plugin-banner__logo">
				<img src="<?php echo esc_url( $data['logo'] ); ?>" alt="OptinMonster Logo">
				<span class="omapi-plugin-banner__page">
					<?php echo get_admin_page_title(); ?>
				</span>
				<?php if ( $this->beta_version() ) : ?>
					&nbsp;&mdash;&nbsp;<strong>Beta Version: <?php echo esc_html( $this->beta_version() ); ?></strong>
				<?php endif; ?>
			</div>
			<ul class="omapi-plugin-banner__icons">
				<li>
					<a class="static-menu-item" target="_blank" rel="noopener" href="https://optinmonster.com/docs/?utm_source=WordPress&utm_medium=BannerHelpButton&utm_campaign=Plugin">
						<img src="<?php echo esc_url( $data['help'] ); ?>" alt="Need Help?">
					</a>
				</li>
			</ul>
		</div>
	</div>
</div>
product-metabox.php000064400000026361151534405700010406 0ustar00<?php
/**
 * Product Education Metabox for WooCommerce Product Pages
 *
 * @since 2.1.0
 */
$svgpath = plugin_dir_path( OMAPI_FILE ) . '/assets/images/icons/';
?>
<div class="omapi-metabox has-slides">
	<nav class="omapi-metabox__nav">
		<ul>
			<li>
				<a href="#increase-conversions" title="Sticky Bar" class="active">
					<?php include $svgpath . 'increase-conversions.svg'; ?>
					<?php esc_html_e( 'Increase Conversions', 'optin-monster-api' ); ?>
				</a>
			</li>
			<li>
				<a href="#reduce-abandonment" title="Popup">
					<?php include $svgpath . 'reduce-abandonment.svg'; ?>
					<?php esc_html_e( 'Reduce Abandonment', 'optin-monster-api' ); ?>
				</a>
			</li>
			<li>
				<a href="#cross-sell" title="Gamified">
					<?php include $svgpath . 'cross-sell.svg'; ?>
					<?php esc_html_e( 'Cross Sell Popup', 'optin-monster-api' ); ?>
				</a>
			</li>
		</ul>
	</nav>
	<div class="omapi-metabox__content">
		<div class="omapi-metabox__slides">
			<div class="omapi-metabox__slides-slide active" id="increase-conversions">
				<div class="omapi-metabox__tab">
					<div class="omapi-metabox__tab-icon omapi-metabox__tab-icon-product">
						<img src="<?php echo esc_url( $this->url . 'assets/images/metabox/increase-conversions.svg' ); ?>">
					</div>
					<div class="omapi-metabox__tab-content omapi-metabox__tab-content-product">

						<p><strong>
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'Increase Conversions', 'optin-monster-api' ); ?>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_title'] ); ?>
							<?php endif; ?>
						</strong></p>
						<p class="secondary">
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'Boost your store sales with one of OptinMonster\'s high-converting popup campaigns.', 'optin-monster-api' ); ?>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_message'] ); ?>
							<?php endif; ?>
						</p>
						<div class="omapi-button-wrap">
							<?php if ( $data['has_sites'] ) : ?>
								<a href="admin.php?page=optin-monster-templates&type=popup" class="button button-primary button-large omapi-metabox__arrow-after" target="_blank" rel="noopener"><?php esc_html_e( 'Create a Campaign', 'optin-monster-api' ); ?></a>
								<a href="admin.php?page=optin-monster-campaigns" class="button button-secondary button-large" target="_blank" rel="noopener"><?php esc_html_e( 'View Existing Campaigns', 'optin-monster-api' ); ?></a>
							<?php else : ?>
								<?php $this->output_view( 'not-connected-buttons.php' ); ?>
							<?php endif; ?>
						</div>
					</div>
				</div>
				<?php if ( $data['has_sites'] ) : ?>
					<div class="omapi-metabox__tab-case-studies">
						<hr>
						<p><strong><?php esc_html_e( 'See Case Studies', 'optin-monster-api' ); ?></strong></p>
						<p class="secondary"><?php esc_html_e( 'Learn how other stores just like yours found success with OptinMonster!', 'optin-monster-api' ); ?></p>
						<ul>
							<li>
								<a href="https://optinmonster.com/marketing-handbags-case-study/?utm_source=WordPress&utm_medium=WooProductMetabox&utm_campaign=Plugin"
									title="<?php esc_attr_e( 'How Urban Southern Increased Sales 400% Using OptinMonster', 'optin-monster-api' ); ?>"
									class="omapi-metabox__link-style"
									target="_blank" rel="noopener"><?php esc_html_e( 'How Urban Southern Increased Sales 400% Using OptinMonster', 'optin-monster-api' ); ?></a>
							</li>
							<li>
								<a href="https://optinmonster.com/overcoming-sales-objections-with-popups/?utm_source=WordPress&utm_medium=WooProductMetabox&utm_campaign=Plugin"
									title="<?php esc_attr_e( 'How Kennedy Blue Increased Sales 50% by Overcoming Sales Objections with Popups', 'optin-monster-api' ); ?>"
									class="omapi-metabox__link-style"
									target="_blank" rel="noopener"><?php esc_html_e( 'How Kennedy Blue Increased Sales 50% by Overcoming Sales Objections with Popups', 'optin-monster-api' ); ?></a>
							</li>
						</ul>
						<a href="https://optinmonster.com/category/case-studies/?utm_source=WordPress&utm_medium=WooProductMetabox&utm_campaign=Plugin"
							title="See more case studies"
							class="omapi-metabox__arrow-after omapi-metabox__link-style"
							target="_blank" rel="noopener"><?php esc_html_e( 'See more case studies', 'optin-monster-api' ); ?>
						</a>
					</div>
				<?php endif; ?>
			</div>
			<div class="omapi-metabox__slides-slide" id="reduce-abandonment">
				<div class="omapi-metabox__tab">
					<div class="omapi-metabox__tab-icon omapi-metabox__tab-icon-product">
						<img src="<?php echo esc_url( $this->url . 'assets/images/metabox/reduce-abandonment.svg' ); ?>">
					</div>
					<div class="omapi-metabox__tab-content omapi-metabox__tab-content-product">

						<p><strong>
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'Reduce Abandonment', 'optin-monster-api' ); ?>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_title'] ); ?>
							<?php endif; ?>
						</strong></p>
						<p class="secondary">
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'Grow your store revenue by getting more people to complete your checkout funnel with an OptinMonster Exit Intent® campaign.', 'optin-monster-api' ); ?>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_message'] ); ?>
							<?php endif; ?>
						</p>
						<div class="omapi-button-wrap">
							<?php if ( $data['has_sites'] ) : ?>
								<a href="admin.php?page=optin-monster-templates&type=popup" class="button button-primary button-large omapi-metabox__arrow-after" target="_blank" rel="noopener"><?php esc_html_e( 'Create a Campaign', 'optin-monster-api' ); ?></a>
								<a href="admin.php?page=optin-monster-campaigns" class="button button-secondary button-large" target="_blank" rel="noopener"><?php esc_html_e( 'View Existing Campaigns', 'optin-monster-api' ); ?></a>
							<?php else : ?>
								<?php $this->output_view( 'not-connected-buttons.php' ); ?>
							<?php endif; ?>
						</div>
					</div>
				</div>
				<?php if ( $data['has_sites'] ) : ?>
					<div class="omapi-metabox__tab-case-studies">
						<hr>
						<p><strong><?php esc_html_e( 'See Case Studies', 'optin-monster-api' ); ?></strong></p>
						<p class="secondary"><?php esc_html_e( 'Learn how other stores just like yours found success with OptinMonster!', 'optin-monster-api' ); ?></p>
						<ul>
							<li>
								<a href="https://optinmonster.com/case-study-how-shockbyte-more-than-doubled-their-sales-conversion-rate-with-exit-intent/?utm_source=WordPress&utm_medium=WooProductMetabox&utm_campaign=Plugin"
									title="<?php esc_attr_e( 'How Shockbyte More Than Doubled Their Sales Conversion Rate With Exit Intent®', 'optin-monster-api' ); ?>"
									class="omapi-metabox__link-style"
									target="_blank" rel="noopener"><?php esc_html_e( 'How Shockbyte More Than Doubled Their Sales Conversion Rate With Exit Intent®', 'optin-monster-api' ); ?></a>
							</li>
							<li>
								<a href="https://optinmonster.com/wild-water-adventures-case-study/?utm_source=WordPress&utm_medium=WooProductMetabox&utm_campaign=Plugin"
									title="<?php esc_attr_e( 'How Wild Water Adventures Recovered $61,000 in Sales Using OptinMonster', 'optin-monster-api' ); ?>"
									class="omapi-metabox__link-style"
									target="_blank" rel="noopener"><?php esc_attr_e( 'How Wild Water Adventures Recovered $61,000 in Sales Using OptinMonster', 'optin-monster-api' ); ?></a>
							</li>
						</ul>
						<a href="https://optinmonster.com/category/case-studies/?utm_source=WordPress&utm_medium=WooProductMetabox&utm_campaign=Plugin"
							title="See more case studies"
							class="omapi-metabox__arrow-after omapi-metabox__link-style"
							target="_blank" rel="noopener"><?php esc_html_e( 'See more case studies', 'optin-monster-api' ); ?>
						</a>
					</div>
				<?php endif; ?>
			</div>
			<div class="omapi-metabox__slides-slide" id="cross-sell">
				<div class="omapi-metabox__tab">
					<div class="omapi-metabox__tab-icon omapi-metabox__tab-icon-product">
						<img src="<?php echo esc_url( $this->url . 'assets/images/metabox/cross-sell.svg' ); ?>">
					</div>
					<div class="omapi-metabox__tab-content omapi-metabox__tab-content-product">

						<p><strong>
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'Cross Sell Popup', 'optin-monster-api' ); ?>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_title'] ); ?>
							<?php endif; ?>
						</strong></p>
						<p class="secondary">
							<?php if ( $data['has_sites'] ) : ?>
								<?php esc_html_e( 'Increase your average cart size and order value by promoting related products to your shoppers.', 'optin-monster-api' ); ?>
							<?php else : ?>
								<?php echo esc_html( $data['not_connected_message'] ); ?>
							<?php endif; ?>
						</p>
						<div class="omapi-button-wrap">
							<?php if ( $data['has_sites'] ) : ?>
								<a href="admin.php?page=optin-monster-templates&type=popup" class="button button-primary button-large omapi-metabox__arrow-after" target="_blank" rel="noopener"><?php esc_html_e( 'Create a Campaign', 'optin-monster-api' ); ?></a>
								<a href="admin.php?page=optin-monster-campaigns" class="button button-secondary button-large" target="_blank" rel="noopener"><?php esc_html_e( 'View Existing Campaigns', 'optin-monster-api' ); ?></a>
							<?php else : ?>
								<?php $this->output_view( 'not-connected-buttons.php' ); ?>
							<?php endif; ?>
						</div>
					</div>
				</div>
				<?php if ( $data['has_sites'] ) : ?>
					<div class="omapi-metabox__tab-case-studies">
						<hr>
						<p><strong><?php esc_html_e( 'See Case Studies', 'optin-monster-api' ); ?></strong></p>
						<p class="secondary"><?php esc_html_e( 'Learn how other stores just like yours found success with OptinMonster!', 'optin-monster-api' ); ?></p>
						<ul>
							<li>
								<a href="https://optinmonster.com/how-to-create-a-woocommerce-popup-to-cross-sell/?utm_source=WordPress&utm_medium=WooProductMetabox&utm_campaign=Plugin"
									title="<?php esc_attr_e( 'How to Create a WooCommerce Popup to Cross-Sell (Step-by-Step)', 'optin-monster-api' ); ?>"
									class="omapi-metabox__link-style"
									target="_blank" rel="noopener"><?php esc_html_e( 'How to Create a WooCommerce Popup to Cross-Sell (Step-by-Step)', 'optin-monster-api' ); ?></a>
							</li>
							<li>
								<a href="https://optinmonster.com/nashville-pedal-tavern-selling-gift-certificates/?utm_source=WordPress&utm_medium=WooProductMetabox&utm_campaign=Plugin"
									title="<?php esc_attr_e( 'How Nashville Pedal Tavern Lifted Sales $2,300 In Just 14 Days Selling Gift Certificates', 'optin-monster-api' ); ?>"
									class="omapi-metabox__link-style"
									target="_blank" rel="noopener"><?php esc_html_e( 'How Nashville Pedal Tavern Lifted Sales $2,300 In Just 14 Days Selling Gift Certificates', 'optin-monster-api' ); ?></a>
							</li>
						</ul>
						<a href="https://optinmonster.com/category/case-studies/?utm_source=WordPress&utm_medium=WooProductMetabox&utm_campaign=Plugin"
							title="See more case studies"
							class="omapi-metabox__arrow-after omapi-metabox__link-style"
							target="_blank" rel="noopener"><?php esc_html_e( 'See more case studies', 'optin-monster-api' ); ?>
						</a>
					</div>
				<?php endif; ?>
			</div>
		</div>
	</div>
</div>
seedprod-settings-page.php000064400000010466151534405700011645 0ustar00<div id="wrap" class="seedprod-wrap">
	<svg class="sp-logo" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 168 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 0s.69.05 14.84 1.9c14.14 1.84 19.04 16.17 10.38 28.68C26.56 19.4 24.1 7.8 14.25 6.45 4.4 5.1 5.26 5.31 5.26 5.31s.17 2.46 1.09 9.07c.92 6.62 6.1 9.86 10.62 11.53 0 0 .27-7.74-2.26-11.15-2.52-3.4-5.66-5.67-5.66-5.67s7.38.89 10.17 6.03c2.78 5.14 2.51 16.02 2.51 16.02l-3-.16c-8.1-.97-15.66-5.84-16.94-16.05C.5 4.72 0 0 0 0Z" fill="url(#a)"/><path d="M37.46 28.36a12.55 12.55 0 0 0 8.03 3.35c5.51 0 8.72-3.22 8.72-6.85 0-8.28-10.55-7.35-10.55-11.48 0-1.6 1.52-2.3 3.11-2.3 1.59 0 3.3.88 4.51 2.09l2.15-3.3c-.46-.49-3.05-2.72-6.7-2.72-3.91 0-7.68 2.23-7.68 6.42 0 7.16 10.46 6.39 10.46 11.35 0 1.7-1.28 2.82-3.67 2.82a9.33 9.33 0 0 1-6.08-2.54l-2.3 3.16ZM70.08 26.88a7.3 7.3 0 0 1-4.74 1.55c-2.49 0-5.16-.69-5.6-3.63h12.11v-1.55c0-4.47-2.55-8.38-7.72-8.38-4.95 0-8.5 3.6-8.5 8.44 0 5.08 3.55 8.34 8.81 8.34 3.55 0 5.98-1.24 6.82-1.95l-1.18-2.82Zm-10.34-5.12c.47-2.33 2.09-3.72 4.42-3.72 2.21 0 3.58 1.7 3.61 3.72h-8.03ZM87.45 26.88a7.3 7.3 0 0 1-4.74 1.55c-2.49 0-5.16-.69-5.6-3.63h12.11v-1.55c0-4.47-2.55-8.38-7.72-8.38-4.95 0-8.5 3.6-8.5 8.44 0 5.08 3.55 8.34 8.81 8.34 3.55 0 5.98-1.24 6.82-1.95l-1.18-2.82ZM77.1 21.76c.47-2.33 2.09-3.72 4.42-3.72 2.21 0 3.58 1.7 3.61 3.72h-8.03ZM102.08 27.65a5.7 5.7 0 0 1-2.93.68c-2.4 0-4.48-1.92-4.48-4.87 0-3.07 1.62-5.2 4.17-5.2 1.18 0 2.52.46 3.24 1.2v8.19Zm0-11.85c-1-.65-2.25-.93-3.37-.93-4.88 0-8.34 3.54-8.34 8.6 0 5.36 4.3 8.18 8.78 8.18 2.27 0 4.76-.56 7-1.92V7.7h-4.07v8.1ZM113.05 31.19v-8.9h1.93c6.2 0 9.06-3.14 9.06-7.63 0-5.3-4.3-6.95-9.09-6.95h-4.89v23.48h3Zm0-11.54v-9.27h2.68c3.02 0 5.2 1.42 5.2 4.3 0 3.05-2.21 4.97-6.01 4.97h-1.87ZM128.82 31.19V21.5c.1-1.33 1.15-3.35 2.92-3.35.88 0 1.5.4 1.9.68l1.1-2.57a4.88 4.88 0 0 0-2.62-.72c-1.78 0-3.08 1.93-3.3 2.67v-2.3h-2.74V31.2h2.74ZM151.17 23.59a8.06 8.06 0 0 0-8.16-8.07 8.05 8.05 0 1 0-.03 16.1c4.6 0 8.19-3.6 8.19-8.03Zm-8.25 5.77c-2.77 0-5.3-2.4-5.3-5.68 0-3.41 2.22-5.83 5.36-5.83 2.86 0 5.3 2.39 5.3 5.74 0 3.44-2.19 5.77-5.36 5.77ZM164.94 28.27a6.98 6.98 0 0 1-3.76 1.06 5.32 5.32 0 0 1-5.52-5.56c0-3.63 2.03-5.89 5.11-5.89 1.68 0 3.4.71 4.17 1.8v8.6Zm0-11.35a6.83 6.83 0 0 0-4.26-1.4c-4.64 0-7.91 3.32-7.91 8.25 0 5.25 4.1 7.85 8.4 7.85 2.22 0 4.52-.62 6.51-1.98V7.7h-2.74v9.2Z" fill="#230820"/><defs><linearGradient id="a" x1="0" y1="0" x2="29.02" y2="28.69" gradientUnits="userSpaceOnUse"><stop offset=".11" stop-color="#FFB800"/><stop offset=".51" stop-color="#EB5500"/><stop offset="1" stop-color="#6712D2"/></linearGradient></defs></svg>
	<h1 class="sp-heading"><?php esc_html_e( 'FREE Drag & Drop Landing Page Builder for WordPress', 'optin-monster-api' ); ?></h1>
	<div class="sp-description"><?php esc_html_e( 'Seedprod Allows You to Create High-Converting Landing Pages in Minutes Instead of Days', 'optin-monster-api' ); ?></div>
	<div class="sp-features">
		<div class="sp-features-box">
			<ul class="sp-bulletlist-wrapper">
				<li class="sp-bulletlist-item" style="padding: 0px 0px 22px;">
					<i>&rarr;</i> <span><?php esc_html_e( 'Create Unlimited Landing Pages', 'optin-monster-api' ); ?></span>
				</li>
				<li class="sp-bulletlist-item" style="padding: 0px 0px 22px;">
					<i>&rarr;</i> <span><?php esc_html_e( 'Free Templates and 200+ Pro Templates', 'optin-monster-api' ); ?></span>
				</li>
				<li class="sp-bulletlist-item" style="padding: 0px 0px 22px;">
					<i>&rarr;</i> <span><?php esc_html_e( 'Free Blocks and 80+ Pro Blocks', 'optin-monster-api' ); ?></span>
				</li>
				<li class="sp-bulletlist-item">
					<i>&rarr;</i> <span>
					<?php
					echo wp_kses(
						__( 'Create Sales, Opt-In, Webinar, Thank You, <br/>Coming Soon pages &amp; more...', 'optin-monster-api' ),
						array( 'br' => array() )
					);
					?>
					</span>
				</li>
			</ul>
		</div>
		<img class="sp-mock-img" src="<?php echo esc_url( $this->url . 'assets/css/images/sp-mockup-1-1x.png' ); ?>" alt="<?php esc_html_e( 'SeedProd Demo Image', 'optin-monster-api' ); ?>">
	</div>
	<div class="sp-form">
		<h3><?php esc_html_e( 'Install and Activate SeedProd - FREE', 'optin-monster-api' ); ?></h3>
		<p><?php esc_html_e( 'Instantly install SeedProd from the WordPress.org plugin repository.', 'optin-monster-api' ); ?></p>
		<?php $this->output_view( 'install-plugin-form.php', $data ); ?>
	</div>
</div>
shortcode-modal-css.php000064400000011370151534405700011135 0ustar00<style type="text/css">
	.om-modal-open-monsterlink #wp-link-wrap {
		visibility: hidden;
	}

	.optin-monster-modal-inline .optin-monster-modal-monsterlink-item {
		display: none !important;
	}

	.optin-monster-modal-monsterlink .optin-monster-modal-inline-item {
		display: none !important;
	}

	.optin-monster-insert-campaign-button .optin-monster-menu-icon {
		font-size:16px;
		margin-top:-2px;
		background-repeat: no-repeat;
		background-position: center;
		background-size: 18px auto;
	}

	#optin-monster-modal-wrap {
		display: none;
		background-color: #fff;
		-webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
		box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
		width: 578px;
		height: 285px;
		overflow: hidden;
		margin-left: -250px;
		margin-top: -125px;
		position: fixed;
		top: 50%;
		left: 50%;
		z-index: 100205;
		-webkit-transition: height 0.2s, margin-top 0.2s;
		transition: height 0.2s, margin-top 0.2s;
	}

	#optin-monster-modal-backdrop {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		min-height: 360px;
		background: #000;
		opacity: 0.7;
		filter: alpha(opacity=70);
		z-index: 100200;
	}

	#optin-monster-modal {
		position: relative;
		height: 100%;
	}

	#optin-monster-modal-title {
		background: #fcfcfc;
		border-bottom: 1px solid #dfdfdf;
		height: 36px;
		font-size: 18px;
		font-weight: 600;
		line-height: 36px;
		padding: 0 36px 0 16px;
		top: 0;
		right: 0;
		left: 0;
	}

	#optin-monster-modal-close {
		color: #666;
		padding: 0;
		position: absolute;
		top: 0;
		right: 0;
		width: 36px;
		height: 36px;
		text-align: center;
		background: none;
		border: none;
		cursor: pointer;
	}

	#optin-monster-modal-close:before {
		font: normal 20px/36px 'dashicons';
		vertical-align: top;
		speak: none;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		width: 36px;
		height: 36px;
		content: '\f158';
	}

	#optin-monster-modal-close:hover,
	#optin-monster-modal-close:focus {
		color: #2ea2cc;
	}

	#optin-monster-modal-close:focus {
		outline: none;
		-webkit-box-shadow: 0 0 0 1px #5b9dd9,
		0 0 2px 1px rgba(30, 140, 190, .8);
		box-shadow: 0 0 0 1px #5b9dd9,
		0 0 2px 1px rgba(30, 140, 190, .8);
	}

	#optin-monster-modal-inner {
		padding: 0 16px 50px;
	}

	#optin-monster-modal-search-toggle:after {
		display: inline-block;
		font: normal 20px/1 'dashicons';
		vertical-align: top;
		speak: none;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		content: '\f140';
	}

	.optin-monster-modal-notice {
		background-color: #d9edf7;
		border: 1px solid #bce8f1;
		color: #31708f;
		padding: 10px;
		margin: 0;
	}

	#optin-monster-modal #optin-monster-modal-options {
		display: flex;
		flex-direction: column;
		justify-content: center;
		height: 200px;
	}

	#optin-monster-modal #optin-monster-modal-options p {
		margin: 0 0 20px;
	}

	#optin-monster-modal #optin-monster-modal-options #om-monsterlink-upgrade {
		font-size: 17px;
		text-align: center;
	}

	#optin-monster-modal #optin-monster-modal-options .optin-monster-modal-inline {
		display: inline-block;
		margin: 0;
		padding: 0 20px 0 0;
	}

	#optin-monster-modal-select-inline-campaign,
	#optin-monster-modal-select-campaign {
		margin-bottom: 20px;
		width: 100%;
		max-width: 100%;
	}

	#optin-monster-modal .submitbox {
		padding: 8px 16px;
		background: #fcfcfc;
		border-top: 1px solid #dfdfdf;
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
	}

	#optin-monster-modal-cancel {
		line-height: 25px;
		float: left;
	}

	#optin-monster-modal-update {
		line-height: 23px;
		float: right;
	}

	#optin-monster-modal-submit,
	#optin-monster-modal-submit-inline {
		float: right;
		margin-bottom: 0;
	}

	@media screen and ( max-width: 782px ) {
		#optin-monster-modal-wrap {
			height: 280px;
			margin-top: -140px;
		}

		#optin-monster-modal-inner {
			padding: 0 16px 60px;
		}

		#optin-monster-modal-cancel {
			line-height: 32px;
		}
	}

	@media screen and ( max-width: 520px ) {
		#optin-monster-modal-wrap {
			width: auto;
			margin-left: 0;
			left: 10px;
			right: 10px;
			max-width: 578px;
		}
	}

	@media screen and ( max-height: 520px ) {
		#optin-monster-modal-wrap {
			-webkit-transition: none;
			transition: none;
		}
	}

	@media screen and ( max-height: 290px ) {
		#optin-monster-modal-wrap {
			height: auto;
			margin-top: 0;
			top: 10px;
			bottom: 10px;
		}

		#optin-monster-modal-inner {
			overflow: auto;
			height: -webkit-calc(100% - 92px);
			height: calc(100% - 92px);
			padding-bottom: 2px;
		}
	}

	#wp-link-wrap.wp-core-ui {
	    height: 555px;
	}

	#om-link-campaign {
		margin-top: 5px;
		width: 70%;
	}

	.mce-container .wp-media-buttons-icon.optin-monster-menu-icon svg {
		height: 20px;
		color: #595959;
	}

	.om-monsterlink-upgrade {
		color: #646970;
		margin: 0 0 0 10px;
		font-size: 12px;
	}
</style>
shortcode-modal.php000064400000004230151534405700010344 0ustar00<div id="optin-monster-modal-backdrop" class="optin-monster-modal-inline" style="display: none"></div>
<div id="optin-monster-modal-wrap" class="optin-monster-modal-inline" style="display: none">
	<form id="optin-monster-modal" tabindex="-1">
		<div id="optin-monster-modal-title">
			<span class="optin-monster-modal-inline-item"><?php esc_html_e( 'Insert OptinMonster Campaign', 'optin-monster-api' ); ?></span>
			<span class="optin-monster-modal-monsterlink-item"><?php esc_html_e( 'Insert/Edit Link to an OptinMonster Campaign', 'optin-monster-api' ); ?></span>
			<button type="button" id="optin-monster-modal-close"><span class="screen-reader-text"><?php esc_html_e( 'Close', 'optin-monster-api' ); ?></span></button>
		</div>
		<div id="optin-monster-modal-inner">
			<div id="optin-monster-modal-options">
				<div class="optin-monster-modal-inline-item">
					<?php $this->output_view( 'inline-campaign-shortcode-modal.php', $data ); ?>
				</div>
				<div class="optin-monster-modal-monsterlink-item">
					<?php $this->output_view( 'monsterlink-campaign-shortcode-modal.php', $data ); ?>
				</div>
			</div>
		</div>
		<div class="submitbox">
			<div id="optin-monster-modal-cancel">
				<a class="submitdelete deletion" href="#"><?php esc_html_e( 'Cancel', 'optin-monster-api' ); ?></a>
			</div>
			<?php if ( ! empty( $data['campaigns']['inline'] ) || ! empty( $data['campaigns']['other'] ) ) : ?>
				<div id="optin-monster-modal-update">
					<?php if ( ! empty( $data['canMonsterlink'] ) ) : ?>
						<button class="button button-primary optin-monster-modal-monsterlink-item" id="optin-monster-modal-submit"><?php esc_html_e( 'Link Campaign', 'optin-monster-api' ); ?></button>
					<?php else : ?>
						<a class="button button-primary optin-monster-modal-monsterlink-item" href="<?php echo esc_url( $data['upgradeUri'] ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Upgrade Now', 'optin-monster-api' ); ?></a>
					<?php endif; ?>
					<button class="button button-primary optin-monster-modal-inline-item" id="optin-monster-modal-submit-inline"><?php esc_html_e( 'Add Campaign', 'optin-monster-api' ); ?></button>
				</div>
			<?php endif; ?>
		</div>
	</form>
</div>
trustpulse-banner.php000064400000002446151534405700010764 0ustar00<header id="masthead" class="navbar-header">
	<nav class="navbar" role="navigation" aria-label="main navigation">
		<div class="navbar-brand">
			<a class="navbar-item" href="<?php echo esc_url( TRUSTPULSE_URL ); ?>?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard">
				<img src="<?php echo esc_url( TRUSTPULSE_URL ); ?>wp-content/themes/trustpulse/assets/images/logo@2x.png" width="170">
			</a>
			<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="siteNavMenu">
				<span aria-hidden="true"></span>
				<span aria-hidden="true"></span>
				<span aria-hidden="true"></span>
			</a>
		</div>
		<div id="siteNavMenu" class="navbar-menu">
			<div class="navbar-end">
				<div class="menu-top-navbar-menu-container">
					<ul id="primary-menu" class="navbar">
						<a class="navbar-item" href="<?php echo esc_url( TRUSTPULSE_APP_URL ); ?>account/support/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard" target="_blank"><span class="hover-underline">Support</span></a>
						<a class="navbar-item" href="<?php echo esc_url( TRUSTPULSE_URL ); ?>docs/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard" target="_blank"><span class="hover-underline">Documentation</span></a>
					</ul>
				</div>
			</div>
		</div>
	</nav>
</header>
trustpulse-settings-page.php000064400000007356151534405700012276 0ustar00<div id="wrap" class="trustpulse-wrap">
	<h1 class="tp-heading">Boost Your Sales and Conversions with Social Proof Notifications</h1>
	<div class="tp-admin-box">
		<p>TrustPulse helps you leverage the true power of social proof to instantly increase trust, conversions and sales by up to 15%</p>
		<?php $this->output_view( 'install-plugin-form.php', $data ); ?>
	</div>
	<h2 class="tp-heading">Top 4 Reasons Why People Love TrustPulse</h2>
	<p class="tp-subheading">Here's why smart business owners love TrustPulse, and you will too!</p>
	<div class="tp-features">
		<div class="tp-feature tp-feature--text-right">
			<div class="tp-feature__image">
				<img src="<?php echo esc_url( $this->url . 'assets/css/images/features-event.svg' ); ?>" alt="Real-Time Event Tracking">
			</div>
			<div class="tp-feature__text">
				<h3>Real-Time Event Tracking</h3>
				<p>Show a live stream of any action on your website, including purchases, demo registrations, email newsletter signups, and more.</p>
			</div>
		</div>
		<div class="tp-feature tp-feature--text-left">
			<div class="tp-feature__image">
				<img src="<?php echo esc_url( $this->url . 'assets/css/images/features-fire.svg' ); ?>" alt="On Fire Notifications">
			</div>
			<div class="tp-feature__text">
				<h3>"On Fire" Notifications</h3>
				<p>Show how many people are taking action in a given period. Great for leveraging FOMO (Fear of Missing Out) on landing pages and checkouts.</p>
			</div>
		</div>
		<div class="tp-feature tp-feature--text-right">
			<div class="tp-feature__image">
				<img src="<?php echo esc_url( $this->url . 'assets/css/images/home-smart-targeting.svg' ); ?>" alt="Real-Time Event Tracking">
			</div>
			<div class="tp-feature__text">
				<h3>Smart Targeting</h3>
				<p>Show your social proof notifications to the right people at the right time to boost conversions by using advanced targeting rules and timing controls.</p>
			</div>
		</div>
		<div class="tp-feature tp-feature--text-left">
			<div class="tp-feature__image">
				<img src="<?php echo esc_url( $this->url . 'assets/css/images/home-flexible.svg' ); ?>" alt="Smart Targeting">
			</div>
			<div class="tp-feature__text">
				<h3>Flexible Design Options</h3>
				<p>Create attractive notifications designed to convert. Customize the message, colors, images, and more to match the look and feel of your website.</p>
			</div>
		</div>
	</div>
	<div class="tp-works-on">
		<h2 class="tp-heading">TrustPulse works with all popular form and ecommerce plugins<br>for WordPress</h2>
		<div class="tp-works-on__icons">
			<img class="tp-works-on__icon" src="<?php echo esc_url( $this->url . 'assets/css/images/wpforms.png' ); ?>" alt="WP Forms">
			<img class="tp-works-on__icon" src="<?php echo esc_url( $this->url . 'assets/css/images/logo-om.png' ); ?>" alt="OptinMonster">
			<img class="tp-works-on__icon" src="<?php echo esc_url( $this->url . 'assets/css/images/woocommerce_logo.png' ); ?>" alt="WooCommerce">
			<img class="tp-works-on__icon" src="<?php echo esc_url( $this->url . 'assets/css/images/logo-edd.png' ); ?>" alt="Easy Digital Downloads">
			<img class="tp-works-on__icon" src="<?php echo esc_url( $this->url . 'assets/css/images/BigCommerce-logo.png' ); ?>" alt="BigCommerce">
			<img class="tp-works-on__icon" src="<?php echo esc_url( $this->url . 'assets/css/images/ninja-forms.png' ); ?>" alt="Ninja Forms">
			<img class="tp-works-on__icon" src="<?php echo esc_url( $this->url . 'assets/css/images/gravity-forms.png' ); ?>" alt="Gravity Forms">
			<img class="tp-works-on__icon" src="<?php echo esc_url( $this->url . 'assets/css/images/memberpress-logo.svg' ); ?>" alt="MemberPress">
			<img class="tp-works-on__icon" src="<?php echo esc_url( $this->url . 'assets/css/images/logo-formidable.png' ); ?>" alt="Formidable">
		</div>
	</div>
</div>
upgrade-link-css.php000064400000000350151534405700010427 0ustar00<style type="text/css">
	.om-submenu-highlight {
		background-color: #1da867;
	}

	.om-menu-highlight {
		color: #fff;
	}

	.om-plugin-upgrade-link,
	.om-plugin-upgrade-link:hover {
		color: #1da867;
		font-weight: 600;
	}
</style>
woocommerce-marketing-card-css.php000064400000003234151534405700013256 0ustar00<?php
/**
 * Marketing Card CSS for WooCommerce Marketing Page
 *
 * @since 2.2.0
 */
?>
<style>
	.components-card-om {
		background: #fff;
		border: 1px solid rgb(226, 228, 231);
		border-radius: 3px;
		box-sizing: border-box;
		margin-bottom: 24px;
		position: relative;
	}

	.components-card-om * {
		box-sizing: border-box;
	}

	.components-card-om-header {
		display: flex;
		-webkit-box-align: center;
		align-items: center;
		-webkit-box-pack: justify;
		justify-content: space-between;
		border-bottom: 1px solid rgb(226, 228, 231);
		border-top-left-radius: 3px;
		border-top-right-radius: 3px;
		padding: 16px 24px;
	}

	.components-card-om-header p {
		margin-right: 0;
		margin: 0px;
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
		font-weight: 400;
		font-size: 20px;
		line-height: 28px;
	}

	.components-card-om-body {
		border-bottom: 1px solid #e0e0e0;
		display: flex;
		align-items: center;
		padding: 18px 24px;
	}

	.components-card-om-body-icon {
		position: relative;
		overflow: hidden;
		width: 36px;
		height: 36px;
		flex-basis: 36px;
		min-width: 36px;
	}

	.components-card-om-body-icon svg {
		margin-top: 2px;
		width: 36px;
		height: auto;
	}

	.components-card-om-body-text-wrap {
		flex-wrap: wrap;
		display: flex;
		align-items: center;
		flex-grow: 2;
		min-width: 0;
		padding: 0 14px;
	}

	.components-card-om-body-text h4 {
		font-weight: 400;
		font-size: 16px;
		margin: 0 0 5px;
		color: #1e1e1e;
	}

	.components-card-om-body-text p {
		color: #757575;
		margin: 0;
		max-width: 550px;
	}

	.components-card-om-body-text p:hover {
		color: #1e1e1e;
	}

</style>
woocommerce-marketing-card.php000064400000002211151534405700012462 0ustar00<?php
/**
 * Marketing Card for WooCommerce Marketing Page
 *
 * @since 2.2.0
 */
?>
<div id="components-card-om" class="components-card-om" style="display:none;">
	<?php $this->output_min_css( 'woocommerce-marketing-card-css.php' ); ?>
	<div class="components-card-om-header">
		<p><?php esc_html_e( 'Increase Your Store Sales Conversion', 'optin-monster-api' ); ?></p>
	</div>
	<div class="components-card-om-body">
		<div class="components-card-om-body-icon">
			<?php require dirname( $this->file ) . '/assets/css/images/icons/archie-color-icon.svg'; ?>
		</div>
		<div class="components-card-om-body-text-wrap">
			<div class="components-card-om-body-text">
				<h4>OptinMonster</h4>
				<p><?php esc_html_e( 'Grow your business with OptinMonster! Use this plugin to help sell more of your product.', 'optin-monster-api' ); ?></p>
			</div>
		</div>
		<div class="components-card-om-body-button">
			<a class="button button-primary" href="admin.php?page=optin-monster-templates&type=popup" title="<?php esc_attr_e( 'Create a Campaign', 'optin-monster-api' ); ?>"><?php esc_html_e( 'Create a Campaign', 'optin-monster-api' ); ?></a>
		</div>
	</div>
</div>
plugin-page.php000064400000021604151536002160007467 0ustar00<?php
/**
 * The plugin page view - the "settings" page of the plugin.
 *
 * @package ocdi
 */

namespace OCDI;

$predefined_themes = $this->import_files;

if ( ! empty( $this->import_files ) && isset( $_GET['import-mode'] ) && 'manual' === $_GET['import-mode'] ) {
	$predefined_themes = array();
}

?>

<div class="ocdi  wrap  about-wrap">

	<?php ob_start(); ?>
		<h1 class="ocdi__title  dashicons-before  dashicons-upload"><?php esc_html_e( 'One Click Demo Import', 'pt-ocdi' ); ?></h1>
	<?php
	$plugin_title = ob_get_clean();

	// Display the plugin title (can be replaced with custom title text through the filter below).
	echo wp_kses_post( apply_filters( 'pt-ocdi/plugin_page_title', $plugin_title ) );

	// Display warrning if PHP safe mode is enabled, since we wont be able to change the max_execution_time.
	if ( ini_get( 'safe_mode' ) ) {
		printf(
			esc_html__( '%sWarning: your server is using %sPHP safe mode%s. This means that you might experience server timeout errors.%s', 'pt-ocdi' ),
			'<div class="notice  notice-warning  is-dismissible"><p>',
			'<strong>',
			'</strong>',
			'</p></div>'
		);
	}

	// Start output buffer for displaying the plugin intro text.
	ob_start();
	?>

	<div class="ocdi__intro-notice  notice  notice-warning  is-dismissible">
		<p><?php esc_html_e( 'Before you begin, make sure all the required plugins are activated.', 'pt-ocdi' ); ?></p>
	</div>

	<div class="ocdi__intro-text">
		<p class="about-description">
			<?php esc_html_e( 'Importing demo data (post, pages, images, theme settings, ...) is the easiest way to setup your theme.', 'pt-ocdi' ); ?>
			<?php esc_html_e( 'It will allow you to quickly edit everything instead of creating content from scratch.', 'pt-ocdi' ); ?>
		</p>

		<hr>

		<p><?php esc_html_e( 'When you import the data, the following things might happen:', 'pt-ocdi' ); ?></p>

		<ul>
			<li><?php esc_html_e( 'No existing posts, pages, categories, images, custom post types or any other data will be deleted or modified.', 'pt-ocdi' ); ?></li>
			<li><?php esc_html_e( 'Posts, pages, images, widgets, menus and other theme settings will get imported.', 'pt-ocdi' ); ?></li>
			<li><?php esc_html_e( 'Please click on the Import button only once and wait, it can take a couple of minutes.', 'pt-ocdi' ); ?></li>
		</ul>

		<?php if ( ! empty( $this->import_files ) ) : ?>
			<?php if ( empty( $_GET['import-mode'] ) || 'manual' !== $_GET['import-mode'] ) : ?>
				<a href="<?php echo esc_url( add_query_arg( array( 'page' => $this->plugin_page_setup['menu_slug'], 'import-mode' => 'manual' ), admin_url( $this->plugin_page_setup['parent_slug'] ) ) ); ?>" class="ocdi__import-mode-switch"><?php esc_html_e( 'Switch to manual import!', 'pt-ocdi' ); ?></a>
			<?php else : ?>
				<a href="<?php echo esc_url( add_query_arg( array( 'page' => $this->plugin_page_setup['menu_slug'] ), admin_url( $this->plugin_page_setup['parent_slug'] ) ) ); ?>" class="ocdi__import-mode-switch"><?php esc_html_e( 'Switch back to theme predefined imports!', 'pt-ocdi' ); ?></a>
			<?php endif; ?>
		<?php endif; ?>

		<hr>
	</div>

	<?php
	$plugin_intro_text = ob_get_clean();

	// Display the plugin intro text (can be replaced with custom text through the filter below).
	echo wp_kses_post( apply_filters( 'pt-ocdi/plugin_intro_text', $plugin_intro_text ) );
	?>

	<?php if ( empty( $this->import_files ) ) : ?>
		<div class="notice  notice-info  is-dismissible">
			<p><?php esc_html_e( 'There are no predefined import files available in this theme. Please upload the import files manually!', 'pt-ocdi' ); ?></p>
		</div>
	<?php endif; ?>

	<?php if ( empty( $predefined_themes ) ) : ?>

		<div class="ocdi__file-upload-container">
			<h2><?php esc_html_e( 'Manual demo files upload', 'pt-ocdi' ); ?></h2>

			<div class="ocdi__file-upload">
				<h3><label for="content-file-upload"><?php esc_html_e( 'Choose a XML file for content import:', 'pt-ocdi' ); ?></label></h3>
				<input id="ocdi__content-file-upload" type="file" name="content-file-upload">
			</div>

			<div class="ocdi__file-upload">
				<h3><label for="widget-file-upload"><?php esc_html_e( 'Choose a WIE or JSON file for widget import:', 'pt-ocdi' ); ?></label></h3>
				<input id="ocdi__widget-file-upload" type="file" name="widget-file-upload">
			</div>

			<div class="ocdi__file-upload">
				<h3><label for="customizer-file-upload"><?php esc_html_e( 'Choose a DAT file for customizer import:', 'pt-ocdi' ); ?></label></h3>
				<input id="ocdi__customizer-file-upload" type="file" name="customizer-file-upload">
			</div>

			<?php if ( class_exists( 'ReduxFramework' ) ) : ?>
			<div class="ocdi__file-upload">
				<h3><label for="redux-file-upload"><?php esc_html_e( 'Choose a JSON file for Redux import:', 'pt-ocdi' ); ?></label></h3>
				<input id="ocdi__redux-file-upload" type="file" name="redux-file-upload">
				<div>
					<label for="redux-option-name" class="ocdi__redux-option-name-label"><?php esc_html_e( 'Enter the Redux option name:', 'pt-ocdi' ); ?></label>
					<input id="ocdi__redux-option-name" type="text" name="redux-option-name">
				</div>
			</div>
			<?php endif; ?>
		</div>

		<p class="ocdi__button-container">
			<button class="ocdi__button  button  button-hero  button-primary  js-ocdi-import-data"><?php esc_html_e( 'Import Demo Data', 'pt-ocdi' ); ?></button>
		</p>

	<?php elseif ( 1 === count( $predefined_themes ) ) : ?>

		<div class="ocdi__demo-import-notice  js-ocdi-demo-import-notice"><?php
			if ( is_array( $predefined_themes ) && ! empty( $predefined_themes[0]['import_notice'] ) ) {
				echo wp_kses_post( $predefined_themes[0]['import_notice'] );
			}
		?></div>

		<p class="ocdi__button-container">
			<button class="ocdi__button  button  button-hero  button-primary  js-ocdi-import-data"><?php esc_html_e( 'Import Demo Data', 'pt-ocdi' ); ?></button>
		</p>

	<?php else : ?>

		<!-- OCDI grid layout -->
		<div class="ocdi__gl  js-ocdi-gl">
		<?php
			// Prepare navigation data.
			$categories = Helpers::get_all_demo_import_categories( $predefined_themes );
		?>
			<?php if ( ! empty( $categories ) ) : ?>
				<div class="ocdi__gl-header  js-ocdi-gl-header">
					<nav class="ocdi__gl-navigation">
						<ul>
							<li class="active"><a href="#all" class="ocdi__gl-navigation-link  js-ocdi-nav-link"><?php esc_html_e( 'All', 'pt-ocdi' ); ?></a></li>
							<?php foreach ( $categories as $key => $name ) : ?>
								<li><a href="#<?php echo esc_attr( $key ); ?>" class="ocdi__gl-navigation-link  js-ocdi-nav-link"><?php echo esc_html( $name ); ?></a></li>
							<?php endforeach; ?>
						</ul>
					</nav>
					<div clas="ocdi__gl-search">
						<input type="search" class="ocdi__gl-search-input  js-ocdi-gl-search" name="ocdi-gl-search" value="" placeholder="<?php esc_html_e( 'Search demos...', 'pt-ocdi' ); ?>">
					</div>
				</div>
			<?php endif; ?>
			<div class="ocdi__gl-item-container  wp-clearfix  js-ocdi-gl-item-container">
				<?php foreach ( $predefined_themes as $index => $import_file ) : ?>
					<?php
						// Prepare import item display data.
						$img_src = isset( $import_file['import_preview_image_url'] ) ? $import_file['import_preview_image_url'] : '';
						// Default to the theme screenshot, if a custom preview image is not defined.
						if ( empty( $img_src ) ) {
							$theme = wp_get_theme();
							$img_src = $theme->get_screenshot();
						}

					?>
					<div class="ocdi__gl-item js-ocdi-gl-item" data-categories="<?php echo esc_attr( Helpers::get_demo_import_item_categories( $import_file ) ); ?>" data-name="<?php echo esc_attr( strtolower( $import_file['import_file_name'] ) ); ?>">
						<div class="ocdi__gl-item-image-container">
							<?php if ( ! empty( $img_src ) ) : ?>
								<img class="ocdi__gl-item-image" src="<?php echo esc_url( $img_src ) ?>">
							<?php else : ?>
								<div class="ocdi__gl-item-image  ocdi__gl-item-image--no-image"><?php esc_html_e( 'No preview image.', 'pt-ocdi' ); ?></div>
							<?php endif; ?>
						</div>
						<div class="ocdi__gl-item-footer<?php echo ! empty( $import_file['preview_url'] ) ? '  ocdi__gl-item-footer--with-preview' : ''; ?>">
							<h4 class="ocdi__gl-item-title" title="<?php echo esc_attr( $import_file['import_file_name'] ); ?>"><?php echo esc_html( $import_file['import_file_name'] ); ?></h4>
							<button class="ocdi__gl-item-button  button  button-primary  js-ocdi-gl-import-data" value="<?php echo esc_attr( $index ); ?>"><?php esc_html_e( 'Import', 'pt-ocdi' ); ?></button>
							<?php if ( ! empty( $import_file['preview_url'] ) ) : ?>
								<a class="ocdi__gl-item-button  button" href="<?php echo esc_url( $import_file['preview_url'] ); ?>" target="_blank"><?php esc_html_e( 'Preview', 'pt-ocdi' ); ?></a>
							<?php endif; ?>
						</div>
					</div>
				<?php endforeach; ?>
			</div>
		</div>

		<div id="js-ocdi-modal-content"></div>

	<?php endif; ?>

	<p class="ocdi__ajax-loader  js-ocdi-ajax-loader">
		<span class="spinner"></span> <?php esc_html_e( 'Importing, please wait!', 'pt-ocdi' ); ?>
	</p>

	<div class="ocdi__response  js-ocdi-ajax-response"></div>
</div>
attributes/tab-panel.php000064400000001350151537324020011307 0ustar00<?php
declare( strict_types=1 );

use Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView;

defined( 'ABSPATH' ) || exit;

/**
 * @var PHPView $this
 */

/**
 * @var array $form
 */
$form = $this->form

?>

<div id="gla_attributes" class="panel woocommerce_options_panel">
	<h2><?php esc_html_e( 'Product attributes', 'google-listings-and-ads' ); ?></h2>
	<p class="show_if_variable"><?php esc_html_e( 'As this is a variable product, you can add additional product attributes by going to Variations > Select one variation > Google for WooCommerce.', 'google-listings-and-ads' ); ?></p>
	<?php
	// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
	echo $this->render_partial( 'inputs/form', [ 'form' => $form ] );
	?>
</div>

attributes/variations-form.php000064400000003430151537324020012565 0ustar00<?php
declare( strict_types=1 );

use Automattic\WooCommerce\GoogleListingsAndAds\Admin\Input\SelectWithTextInput;
use Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView;

defined( 'ABSPATH' ) || exit;

/**
 * @var PHPView $this
 */

/**
 * @var array $children
 */
$children = $this->children;
?>

<?php if ( $this->is_root ) : ?>
<div class="gla-metabox wc-metabox closed">
	<h3>
		<strong><?php esc_html_e( 'Google for WooCommerce', 'google-listings-and-ads' ); ?></strong>
		<div class="handlediv" aria-label="Click to toggle"></div>
	</h3>
	<div class="wc-metabox-content" style="display: none;">
	<?php endif; ?>
	<?php
	foreach ( $children as $form ) {
		if ( ! empty( $form['type'] ) ) {
			$form['wrapper_class'] =
				sprintf( '%s %s', $form['wrapper_class'] ?? '', 'form-row form-row-full' );

			if ( 'select-with-text-input' === $form['type'] && ! empty( $form['children'][ SelectWithTextInput::SELECT_INPUT_KEY ] ) && ! empty( $form['children'][ SelectWithTextInput::CUSTOM_INPUT_KEY ] ) ) {
				$form['children'][ SelectWithTextInput::SELECT_INPUT_KEY ]['wrapper_class'] =
					sprintf( '%s %s', $form['children'][ SelectWithTextInput::SELECT_INPUT_KEY ]['wrapper_class'] ?? '', 'form-row form-row-first' );

				$form['children'][ SelectWithTextInput::CUSTOM_INPUT_KEY ]['wrapper_class'] =
					sprintf( '%s %s', $form['children'][ SelectWithTextInput::CUSTOM_INPUT_KEY ]['wrapper_class'] ?? '', 'form-row form-row-last' );
			}

			// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
			echo $this->render_partial( 'inputs/form', [ 'form' => $form ] );
		} else {
			// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
			echo $this->render_partial( 'attributes/variations-form', $form );
		}
	}
	?>
	<?php if ( $this->is_root ) : ?>
	</div>
</div>
<?php endif; ?>
bulk-edit/shop_coupon.php000064400000002472151537324020011500 0ustar00<?php
/**
 * Bulk Edit Coupons
 */

use Automattic\WooCommerce\GoogleListingsAndAds\Value\ChannelVisibility;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

?>

<fieldset class="inline-edit-col-right">
	<div id="google-listings-and-ads-fields-bulk" class="inline-edit-col">

		<div class="inline-edit-group">
			<label class="alignleft">
				<span class="title"><?php esc_html_e( 'Google visibility', 'google-listings-and-ads' ); ?></span>
				<span class="input-text-wrap">
					<select class="change_channel_visibility change_to" name="change_channel_visibility">
						<?php
						$options = [
							'' => __( '— No change —', 'google-listings-and-ads' ),
							ChannelVisibility::SYNC_AND_SHOW => __( 'Show coupon', 'google-listings-and-ads' ),
							ChannelVisibility::DONT_SYNC_AND_SHOW => __( 'Don\'t show coupon', 'google-listings-and-ads' ),
						];
						foreach ( $options as $key => $value ) {
							echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
						}
						?>
					</select>
				</span>
			</label>
		</div>

		<input type="hidden" name="woocommerce_gla_bulk_edit" value="1" />
		<input type="hidden" name="woocommerce_gla_bulk_edit_nonce" value="<?php echo esc_attr( wp_create_nonce( 'woocommerce_gla_bulk_edit_nonce' ) ); ?>" />
	</div>
</fieldset>
inputs/checkbox.php000064400000000650151537324020010370 0ustar00<?php
declare( strict_types=1 );

defined( 'ABSPATH' ) || exit;

/**
 * @var \Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView $this
 */

/**
 * @var array $input
 */
$input = $this->input;

$input['value'] = $input['value'] ?? false;
$input['value'] = wc_bool_to_string( $input['value'] );

$input['wrapper_class'] = sprintf( '%s %s', $input['wrapper_class'] ?? '', 'options' );

woocommerce_wp_checkbox( $input );
inputs/datetime.php000064400000003357151537324020010405 0ustar00<?php
/**
 * Datetime input template
 *
 * @since 1.5.0
 */

declare( strict_types=1 );

defined( 'ABSPATH' ) || exit;

/**
 * @var \Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView $this
 */

/**
 * @var array $input
 */
$input = $this->input;

$input['class']         = $input['class'] ?? '';
$input['wrapper_class'] = $input['wrapper_class'] ?? '';
$input['name']          = $input['name'] ?? $input['id'];
$input['desc_tip']      = $input['desc_tip'] ?? false;
$input['date']          = $input['date'] ?? '';
$input['time']          = $input['time'] ?? '';

echo '<p class="form-field ' . esc_attr( $input['id'] ) . '_field gla-input-datetime ' . esc_attr( $input['wrapper_class'] ) . '">
		<label for="' . esc_attr( $input['id'] ) . '_date">' . wp_kses_post( $input['label'] ) . '</label>';

// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
echo '<input type="date" pattern="\d{4}-\d{2}-\d{2}" class="' . esc_attr( $input['class'] ) . '" name="' . esc_attr( $input['name'] ) . '[date]" id="' . esc_attr( $input['id'] ) . '_date" value="' . esc_attr( $input['date'] ) . '" /> ';
echo '<input type="time" pattern="[0-9]{2}:[0-9]{2}" class="' . esc_attr( $input['class'] ) . '" name="' . esc_attr( $input['name'] ) . '[time]" id="' . esc_attr( $input['id'] ) . '_time" value="' . esc_attr( $input['time'] ) . '" /> ';
// phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped

if ( ! empty( $input['description'] ) && false !== $input['desc_tip'] ) {
	echo wc_help_tip( $input['description'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}

if ( ! empty( $input['description'] ) && false === $input['desc_tip'] ) {
	echo '<span class="description">' . wp_kses_post( $input['description'] ) . '</span>';
}

echo '</p>';
inputs/decimal.php000064400000000454151537324020010202 0ustar00<?php
declare( strict_types=1 );

defined( 'ABSPATH' ) || exit;

/**
 * @var \Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView $this
 */

/**
 * @var array $input
 */
$input = $this->input;

$input['type']      = 'text';
$input['data_type'] = 'decimal';

woocommerce_wp_text_input( $input );
inputs/form.php000064400000001332151537324020007543 0ustar00<?php
declare( strict_types=1 );

defined( 'ABSPATH' ) || exit;

/**
 * @var \Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView $this
 */

/**
 * @var array $form
 */
$form = $this->form;
?>

<div class="gla-input <?php echo esc_attr( $form['gla_wrapper_class'] ?? '' ); ?>">
	<?php
	if ( ! empty( $form['type'] ) ) {
		// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
		echo $this->render_partial( path_join( 'inputs/', $form['type'] ), [ 'input' => $form ] );
	}

	if ( ! empty( $form['children'] ) ) {
		foreach ( $form['children'] as $form ) {
			// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
			echo $this->render_partial( 'inputs/form', [ 'form' => $form ] );
		}
	}
	?>
</div>


inputs/integer.php000064400000000575151537324020010245 0ustar00<?php
declare( strict_types=1 );

defined( 'ABSPATH' ) || exit;

/**
 * @var \Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView $this
 */

/**
 * @var array $input
 */
$input = $this->input;

$input['type'] = 'number';
// Not so "custom" but standard `<input type="number">` attribute.
$input['custom_attributes'] = [
	'min' => '0',
];

woocommerce_wp_text_input( $input );
inputs/select-with-text-input.php000064400000000306151537324020013147 0ustar00<?php
declare( strict_types=1 );

defined( 'ABSPATH' ) || exit;

/**
 * @var \Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView $this
 */

/**
 * @var array $input
 */
$input = $this->input;
inputs/select.php000064400000000350151537324020010056 0ustar00<?php
declare( strict_types=1 );

defined( 'ABSPATH' ) || exit;

/**
 * @var \Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView $this
 */

/**
 * @var array $input
 */
$input = $this->input;

woocommerce_wp_select( $input );
inputs/text.php000064400000000354151537324020007567 0ustar00<?php
declare( strict_types=1 );

defined( 'ABSPATH' ) || exit;

/**
 * @var \Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView $this
 */

/**
 * @var array $input
 */
$input = $this->input;

woocommerce_wp_text_input( $input );
meta-box/channel_visibility.php000064400000006610151537324020012655 0ustar00<?php
declare( strict_types=1 );

use Automattic\WooCommerce\GoogleListingsAndAds\Value\ChannelVisibility;
use Automattic\WooCommerce\GoogleListingsAndAds\Value\SyncStatus;
use Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView;

defined( 'ABSPATH' ) || exit;

/** @var PHPView $this */

/** @var int $product_id */
$product_id = $this->product_id;
/** @var WC_Product $product */
$product = $this->product;

$channel_visibility = $this->channel_visibility;

/** @var string */
$field_id = $this->field_id;
/** @var bool */
$is_setup_complete = $this->is_setup_complete;
/** @var string */
$get_started_url = $this->get_started_url;

/** @var string $sync_status */
if ( SyncStatus::HAS_ERRORS === $this->sync_status ) {
	$sync_status = __( 'Issues detected', 'google-listings-and-ads' );
} elseif ( ! is_null( $this->sync_status ) ) {
	$sync_status = ucfirst( str_replace( '-', ' ', $this->sync_status ) );
}
$show_status = ! empty( $sync_status ) && $channel_visibility === ChannelVisibility::SYNC_AND_SHOW && $this->sync_status !== SyncStatus::SYNCED;

/** @var array $issues */
$issues     = $this->issues;
$has_issues = ! empty( $issues );

$visibility_box_class = $has_issues ? 'notice-warning' : '';
$visibility_box_style = $has_issues ? 'border-left-style: solid' : 'background-color:#efefef';

$input_description = '';
$input_disabled    = false;
if ( ! $product->is_visible() ) {
	$channel_visibility = ChannelVisibility::DONT_SYNC_AND_SHOW;
	$show_status        = false;
	$input_disabled     = true;
	$input_description  = __( 'This product cannot be shown on any channel because it is hidden from your store catalog.', 'google-listings-and-ads' );
}

$custom_attributes = [];
if ( $input_disabled ) {
	$custom_attributes['disabled'] = 'disabled';
}
?>

<div class="gla-channel-visibility-box">
	<?php if ( $is_setup_complete ) : ?>
		<?php
		woocommerce_wp_select(
			[
				'id'                => $field_id,
				'value'             => $channel_visibility,
				'label'             => __( 'Google for WooCommerce', 'google-listings-and-ads' ),
				'description'       => $input_description,
				'desc_tip'          => false,
				'options'           => ChannelVisibility::get_value_options(),
				'custom_attributes' => $custom_attributes,
				'wrapper_class'     => 'form-row form-row-full',
			]
		);
		?>
		<?php if ( $show_status ) : ?>
			<div
				class="sync-status notice-alt notice-large <?php echo esc_attr( $visibility_box_class ); ?>"
				style="<?php echo esc_attr( $visibility_box_style ); ?>"
			>
				<p><strong><?php esc_html_e( 'Google sync status', 'google-listings-and-ads' ); ?></strong></p>
				<p><?php echo esc_html( $sync_status ); ?></p>
				<?php if ( $has_issues ) : ?>
					<div class="gla-product-issues">
						<p><strong><?php esc_html_e( 'Issues', 'google-listings-and-ads' ); ?></strong></p>
						<ul>
							<?php foreach ( $issues as $issue ) : ?>
								<li><?php echo esc_html( $issue ); ?></li>
							<?php endforeach; ?>
						</ul>
					</div>
				<?php endif; ?>
			</div>
		<?php endif; ?>
	<?php else : ?>
		<p><strong><?php esc_html_e( 'Google for WooCommerce', 'google-listings-and-ads' ); ?></strong></p>
		<p><?php esc_html_e( 'Complete setup to get your products listed on Google for free.', 'google-listings-and-ads' ); ?></p>
		<a href="<?php echo esc_attr( $get_started_url ); ?>"
			class="button"><?php esc_html_e( 'Complete setup', 'google-listings-and-ads' ); ?></a>
	<?php endif; ?>
</div>
meta-box/coupon_channel_visibility.php000064400000011132151537324020014233 0ustar00<?php
declare(strict_types = 1);

use Automattic\WooCommerce\GoogleListingsAndAds\Coupon\CouponSyncer;
use Automattic\WooCommerce\GoogleListingsAndAds\Value\ChannelVisibility;
use Automattic\WooCommerce\GoogleListingsAndAds\Value\SyncStatus;
use Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView;

defined( 'ABSPATH' ) || exit();

/**
 *
 * @var PHPView $this
 */

/**
 *
 * @var int $coupon_id
 */
$coupon_id = $this->coupon_id;

/**
 *
 * @var WC_Coupon $coupon
 */
$coupon = $this->coupon;

$channel_visibility = $this->channel_visibility;

/**
 *
 * @var string
 */
$field_id = $this->field_id;

/**
 *
 * @var bool
 */
$is_setup_complete = $this->is_setup_complete;

/**
 *
 * @var bool
 */
$is_channel_supported = $this->is_channel_supported;

/**
 *
 * @var string
 */
$get_started_url = $this->get_started_url;

/**
 *
 * @var string $sync_status
 */
$is_synced = false;
if ( SyncStatus::HAS_ERRORS === $this->sync_status ) {
	$sync_status = __( 'Issues detected', 'google-listings-and-ads' );
} elseif ( SyncStatus::PENDING === $this->sync_status ) {
	$sync_status = __( 'Pending for sync', 'google-listings-and-ads' );
} elseif ( SyncStatus::SYNCED === $this->sync_status ) {
	$is_synced   = true;
	$sync_status = __( 'Sent to Google', 'google-listings-and-ads' );
} elseif ( ! is_null( $this->sync_status ) ) {
	$sync_status = ucfirst( str_replace( '-', ' ', $this->sync_status ) );
}

$show_status = $channel_visibility ===
ChannelVisibility::SYNC_AND_SHOW && ( ! is_null( $this->sync_status ) );

$check_email_notice = __( 'Check your email for updates.', 'google-listings-and-ads' );

/**
 *
 * @var array $issues
 */
$issues     = $this->issues;
$has_issues = ! empty( $issues );

$input_description = '';
$input_disabled    = false;
if ( ! CouponSyncer::is_coupon_supported( $coupon ) ) {
	$channel_visibility = ChannelVisibility::DONT_SYNC_AND_SHOW;
	$show_status        = false;
	$input_disabled     = true;
	$input_description  = $coupon->get_virtual() ?
		__( 'This coupon cannot be shown on public channel because it is hidden from your store.', 'google-listings-and-ads' ) :
		__( 'This coupon cannot be shown because the coupon restrictions are not supported to share in Google channel.', 'google-listings-and-ads' );
} elseif ( ! $is_channel_supported ) {
	$channel_visibility = ChannelVisibility::DONT_SYNC_AND_SHOW;
	$show_status        = false;
	$input_disabled     = true;
	$input_description  = __(
		'This coupon visibility channel has not been supported in your store base country yet.',
		'google-listings-and-ads'
	);
}

$custom_attributes = [];
if ( $input_disabled ) {
	$custom_attributes['disabled'] = 'disabled';
}
?>

<div class="gla-channel-visibility-box">
	<?php if ( $is_setup_complete ) : ?>
		<?php
		woocommerce_wp_select(
			[
				'id'                => $field_id,
				'value'             => $channel_visibility,
				'label'             => __( 'Google for WooCommerce', 'google-listings-and-ads' ),
				'description'       => $input_description,
				'desc_tip'          => false,
				'options'           => [
					ChannelVisibility::SYNC_AND_SHOW      => __(
						'Show coupon on Google',
						'google-listings-and-ads'
					),
					ChannelVisibility::DONT_SYNC_AND_SHOW => __(
						"Don't show coupon on Google",
						'google-listings-and-ads'
					),
				],
				'custom_attributes' => $custom_attributes,
				'wrapper_class'     => 'form-row form-row-full',
			]
		);
		?>
		<?php if ( $show_status ) : ?>
			<?php if ( $has_issues ) : ?>
			<div class="sync-status notice-alt notice-large notice-warning"
				style="border-left-style: solid">
				<div class="gla-product-issues">
					<p>
						<strong><?php esc_html_e( 'Coupon issues', 'google-listings-and-ads' ); ?></strong>
					</p>
					<ul>
						<?php foreach ( $issues as $issue ) : ?>
						<li><?php echo esc_html( $issue ); ?></li>
						<?php endforeach; ?>
					</ul>
				</div>
			</div>
			<?php else : ?>
			<div class="sync-status notice-alt notice-large" style="background-color:#efefef">
				<p><strong><?php echo esc_html( $sync_status ); ?></strong></p>
			</div>
				<?php if ( $is_synced ) : ?>
				<div style="padding: 10px 0px" >
					<?php echo esc_html( $check_email_notice ); ?>
				</div>
				<?php endif; ?>
			<?php endif; ?>
		<?php endif; ?>
	<?php else : ?>
	<p>
		<strong><?php esc_html_e( 'Google for WooCommerce', 'google-listings-and-ads' ); ?></strong>
	</p>
	<p><?php esc_html_e( 'Complete setup to get your coupon listed on Google for free.', 'google-listings-and-ads' ); ?></p>
	<a href="<?php echo esc_attr( $get_started_url ); ?>" class="button"><?php esc_html_e( 'Complete setup', 'google-listings-and-ads' ); ?></a>
	<?php endif; ?>
</div>
activate.php000064400000000263151537335020007062 0ustar00<div class="akismet-box">
	<?php Akismet::view( 'title' ); ?>
	<?php Akismet::view( 'setup' ); ?>
</div>
<br/>
<div class="akismet-box">
	<?php Akismet::view( 'enter' ); ?>
</div>compatible-plugins.php000064400000010116151537335020011056 0ustar00<?php

/** @var array|WP_Error $compatible_plugins */
$compatible_plugins = Akismet_Compatible_Plugins::get_installed_compatible_plugins();
if ( is_array( $compatible_plugins ) ) :

	$compatible_plugin_count = count( $compatible_plugins );
	?>
	<div class="akismet-card akismet-compatible-plugins">
		<div class="akismet-section-header">
			<h2 class="akismet-section-header__label  akismet-compatible-plugins__section-header-label" aria-label="<?php esc_attr_e( 'Compatible plugins (new feature)', 'akismet' ); ?>">
				<span class="akismet-compatible-plugins__section-header-label-text"><?php esc_html_e( 'Compatible plugins', 'akismet' ); ?></span>
				<span class="akismet-new-feature"><?php esc_html_e( 'New', 'akismet' ); ?></span>
			</h2>
		</div>

		<div class="akismet-compatible-plugins__content">
			<?php

			echo '<p>';
			echo esc_html( __( 'Akismet works with other plugins to keep spam away.', 'akismet' ) );
			echo '</p>';

			echo '<p>';

			if ( 0 === $compatible_plugin_count ) {
				echo '<a class="akismet-settings__external-link" href="https://akismet.com/developers/plugins-and-libraries/">';
				echo esc_html( __( 'See supported integrations', 'akismet' ) );
				echo '</a>';
			} else {
				echo esc_html(
					_n(
						"The plugin you've installed is compatible. Follow the documentation link to get started.",
						"The plugins you've installed are compatible. Follow the documentation links to get started.",
						$compatible_plugin_count,
						'akismet'
					)
				);
			}

			echo '</p>';

			?>

			<?php if ( ! empty( $compatible_plugins ) ) : ?>
				<ul class="akismet-compatible-plugins__list" id="akismet-compatible-plugins__list">
					<?php

					foreach ( $compatible_plugins as $compatible_plugin ) :
						if ( empty( $compatible_plugin['help_url'] ) ) {
							continue;
						}

						?>
						<li class="akismet-compatible-plugins__card">
							<?php if ( strlen( $compatible_plugin['logo'] ) > 0 ) : ?>
								<?php

								$logo_alt = sprintf(
									/* translators: The placeholder is the name of a plugin, like "Jetpack" . */
									__( '%s logo', 'akismet' ),
									$compatible_plugin['name']
								);

								?>
								<img
									src="<?php echo esc_url( $compatible_plugin['logo'] ); ?>"
									alt="<?php echo esc_attr( $logo_alt ); ?>"
									class="akismet-compatible-plugins__card-logo"
									width="55"
									height="55"
								/>
							<?php endif ?>
							<div class="akismet-compatible-plugins__card-detail">
								<h3 class="akismet-compatible-plugins__card-title"><?php echo esc_html( $compatible_plugin['name'] ); ?></h3>
								<div class="akismet-compatible-plugins__docs">
									<a
										class="akismet-settings__external-link"
										href="<?php echo esc_url( $compatible_plugin['help_url'] ); ?>"
										aria-label="
											<?php

											echo esc_attr(
												sprintf(
													/* translators: The placeholder is the name of a plugin, like "Jetpack" . */
													__( 'Documentation for %s', 'akismet' ),
													$compatible_plugin['name']
												)
											);

											?>
									"><?php esc_html_e( 'View documentation', 'akismet' ); ?></a>
								</div>
							</div>
						</li>
					<?php endforeach; ?>
				</ul>

				<?php if ( $compatible_plugin_count > Akismet_Compatible_Plugins::DEFAULT_VISIBLE_PLUGIN_COUNT ) : ?>
					<button class="akismet-compatible-plugins__show-more"
						aria-expanded="false"
						aria-controls="akismet-compatible-plugins__list"
						data-label-closed="
							<?php

							/* translators: %d: number of compatible plugins, which is guaranteed to be more than 1. */
							echo esc_attr( sprintf( __( 'Show all %d plugins', 'akismet' ), $compatible_plugin_count ) );

							?>
						"
						data-label-open="<?php echo esc_attr( __( 'Show less', 'akismet' ) ); ?>">
						<?php

						/* translators: %d: number of compatible plugins, which is guaranteed to be more than 1. */
						echo esc_html( sprintf( __( 'Show all %d plugins', 'akismet' ), $compatible_plugin_count ) );

						?>
					</button>
				<?php endif; ?>

			<?php endif; ?>
		</div>
	</div>
	<?php
	endif;
config.php000064400000036112151537335020006531 0ustar00<?php

//phpcs:disable VariableAnalysis
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
$kses_allow_link_href = array(
	'a' => array(
		'href' => true,
	),
);
?>
<div id="akismet-plugin-container">
	<div class="akismet-masthead">
		<div class="akismet-masthead__inside-container">
			<?php Akismet::view( 'logo' ); ?>
		</div>
	</div>
	<div class="akismet-lower">
		<?php if ( Akismet::get_api_key() ) { ?>
			<?php Akismet_Admin::display_status(); ?>
		<?php } ?>
		<?php if ( ! empty( $notices ) ) { ?>
			<?php foreach ( $notices as $notice ) { ?>
				<?php Akismet::view( 'notice', array_merge( $notice, array( 'parent_view' => $name ) ) ); ?>
			<?php } ?>
		<?php } ?>

		<?php if ( isset( $stat_totals['all'] ) && isset( $stat_totals['6-months'] ) ) : ?>
			<div class="akismet-card">
				<div class="akismet-section-header">
					<h2 class="akismet-section-header__label">
						<span><?php esc_html_e( 'Statistics', 'akismet' ); ?></span>
					</h2>

					<div class="akismet-section-header__actions">
						<a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>">
							<?php esc_html_e( 'Detailed stats', 'akismet' ); ?>
						</a>
					</div>
				</div> <!-- close akismet-section-header -->

				<div class="akismet-new-snapshot">
					<?php /* name attribute on iframe is used as a cache-buster here to force Firefox to load the new style charts: https://bugzilla.mozilla.org/show_bug.cgi?id=356558 */ ?>
					<div class="akismet-new-snapshot__chart">
						<iframe id="stats-iframe" allowtransparency="true" scrolling="no" frameborder="0" style="width: 100%; height: 220px; overflow: hidden;" src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/snapshot.php?blog=%s&token=%s&height=200&locale=%s&is_redecorated=1', rawurlencode( get_option( 'home' ) ), rawurlencode( Akismet::get_access_token() ), get_user_locale() ) ); ?>" name="<?php echo esc_attr( 'snapshot-' . filemtime( __FILE__ ) ); ?>" title="<?php echo esc_attr__( 'Akismet stats', 'akismet' ); ?>"></iframe>
					</div>

					<ul class="akismet-new-snapshot__list">
						<li class="akismet-new-snapshot__item">
							<h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Past six months', 'akismet' ); ?></h3>
							<span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['6-months']->spam ); ?></span>
							<span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?></span>
						</li>
						<li class="akismet-new-snapshot__item">
							<h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'All time', 'akismet' ); ?></h3>
							<span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['all']->spam ); ?></span>
							<span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, 'akismet' ) ); ?></span>
						</li>
						<li class="akismet-new-snapshot__item">
							<h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Accuracy', 'akismet' ); ?></h3>
							<span class="akismet-new-snapshot__number"><?php echo floatval( $stat_totals['all']->accuracy ); ?>%</span>
							<span class="akismet-new-snapshot__text">
							<?php
							/* translators: %s: number of spam missed by Akismet */
							echo esc_html( sprintf( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ) ) . ', ';
							/* translators: %s: number of false positive spam flagged by Akismet */
							echo esc_html( sprintf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ) );
							?>
							</span>
						</li>
					</ul>
				</div> <!-- close akismet-new-snapshot -->
			</div> <!-- close akismet-card -->
		<?php endif; ?>

		<?php if ( apply_filters( 'akismet_show_compatible_plugins', true ) ) : ?>
			<?php Akismet::view( 'compatible-plugins' ); ?>
		<?php endif; ?>

		<?php if ( $akismet_user ) : ?>
			<div class="akismet-card">
				<div class="akismet-section-header">
					<h2 class="akismet-section-header__label">
						<span><?php esc_html_e( 'Settings', 'akismet' ); ?></span>
					</h2>
				</div>

				<div class="inside">
					<form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" autocomplete="off" method="POST" id="akismet-settings-form">

						<div class="akismet-settings">
							<?php if ( ! Akismet::predefined_api_key() ) : ?>
								<div class="akismet-settings__row">
									<h3 class="akismet-settings__row-title">
										<label class="akismet-settings__row-label" for="key"><?php esc_html_e( 'API key', 'akismet' ); ?></label>
									</h3>
									<div class="akismet-settings__row-input">
										<span class="api-key"><input id="key" name="key" type="text" size="15" value="<?php echo esc_attr( get_option( 'wordpress_api_key' ) ); ?>" class="<?php echo esc_attr( 'regular-text code ' . $akismet_user->status ); ?>"></span>
									</div>
								</div>
							<?php endif; ?>

							<?php
							//phpcs:ignore WordPress.Security.NonceVerification.Recommended
							if ( isset( $_GET['ssl_status'] ) ) :
								?>
								<div class="akismet-settings__row">
									<div class="akismet-settings__row-text">
										<h3 class="akismet-settings__row-title"><?php esc_html_e( 'SSL status', 'akismet' ); ?></h3>
										<div class="akismet-settings__row-description">
											<?php if ( ! wp_http_supports( array( 'ssl' ) ) ) : ?>
												<strong><?php esc_html_e( 'Disabled.', 'akismet' ); ?></strong>
												<?php esc_html_e( 'Your Web server cannot make SSL requests; contact your Web host and ask them to add support for SSL requests.', 'akismet' ); ?>
											<?php else : ?>
												<?php $ssl_disabled = get_option( 'akismet_ssl_disabled' ); ?>

												<?php if ( $ssl_disabled ) : ?>
													<strong><?php esc_html_e( 'Temporarily disabled.', 'akismet' ); ?></strong>
													<?php esc_html_e( 'Akismet encountered a problem with a previous SSL request and disabled it temporarily. It will begin using SSL for requests again shortly.', 'akismet' ); ?>
												<?php else : ?>
													<strong><?php esc_html_e( 'Enabled.', 'akismet' ); ?></strong>
													<?php esc_html_e( 'All systems functional.', 'akismet' ); ?>
												<?php endif; ?>
											<?php endif; ?>
										</div>
									</div>
								</div>
							<?php endif; ?>

							<div class="akismet-settings__row">
								<div class="akismet-settings__row-text">
									<h3 class="akismet-settings__row-title"><?php esc_html_e( 'Comments', 'akismet' ); ?></h3>
								</div>
								<div class="akismet-settings__row-input">
									<label class="akismet-settings__row-input-label" for="akismet_show_user_comments_approved">
										<input
										name="akismet_show_user_comments_approved"
										id="akismet_show_user_comments_approved"
										value="1"
										type="checkbox"
										<?php
										// If the option isn't set, or if it's enabled ('1'), or if it was enabled a long time ago ('true'), check the checkbox.
										checked( true, ( in_array( get_option( 'akismet_show_user_comments_approved' ), array( false, '1', 'true' ), true ) ) );
										?>
										/>
										<span class="akismet-settings__row-label-text">
											<?php esc_html_e( 'Show the number of approved comments beside each comment author.', 'akismet' ); ?>
										</span>
									</label>
								</div>
							</div>

							<div class="akismet-settings__row is-radio">
								<div class="akismet-settings__row-text">
									<h3 class="akismet-settings__row-title"><?php esc_html_e( 'Spam filtering', 'akismet' ); ?></h3>
								</div>
								<div class="akismet-settings__row-input">
									<fieldset>
										<legend class="screen-reader-text">
											<span><?php esc_html_e( 'Akismet Anti-spam strictness', 'akismet' ); ?></span>
										</legend>
										<div>
											<label class="akismet-settings__row-input-label" for="akismet_strictness_1">
												<input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked( '1', get_option( 'akismet_strictness' ) ); ?> />
												<span class="akismet-settings__row-label-text">
													<?php esc_html_e( 'Silently discard the worst and most pervasive spam so I never see it.', 'akismet' ); ?>
												</span>
											</label>
										</div>
										<div>
											<label class="akismet-settings__row-input-label" for="akismet_strictness_0">
												<input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked( '0', get_option( 'akismet_strictness' ) ); ?> />
												<span class="akismet-settings__row-label-text">
													<?php esc_html_e( 'Always put spam in the Spam folder for review.', 'akismet' ); ?>
												</span>
											</label>
										</div>
									</fieldset>

									<div class="akismet-settings__row-note">
										<strong><?php esc_html_e( 'Note:', 'akismet' ); ?></strong>
										<?php
										$delete_interval = max( 1, intval( apply_filters( 'akismet_delete_comment_interval', 15 ) ) );

										$spam_folder_link = sprintf(
											'<a href="%s">%s</a>',
											esc_url( admin_url( 'edit-comments.php?comment_status=spam' ) ),
											esc_html__( 'spam folder', 'akismet' )
										);

										// The _n() needs to be on one line so the i18n tooling can extract the translator comment.
										/* translators: %1$s: spam folder link, %2$d: delete interval in days */
										$delete_message = _n( 'Spam in the %1$s older than %2$d day is deleted automatically.', 'Spam in the %1$s older than %2$d days is deleted automatically.', $delete_interval, 'akismet' );

										printf(
											wp_kses( $delete_message, $kses_allow_link_href ),
											wp_kses( $spam_folder_link, $kses_allow_link_href ),
											esc_html( $delete_interval )
										);
										?>
									</div>
								</div>
							</div>

							<div class="akismet-settings__row is-radio">
								<div class="akismet-settings__row-text">
									<h3 class="akismet-settings__row-title"><?php esc_html_e( 'Privacy', 'akismet' ); ?></h3>
								</div>
								<div class="akismet-settings__row-input">
									<fieldset>
										<legend class="screen-reader-text">
											<span><?php esc_html_e( 'Akismet privacy notice', 'akismet' ); ?></span>
										</legend>
										<div>
											<label class="akismet-settings__row-input-label" for="akismet_comment_form_privacy_notice_display">
												<input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_display" value="display" <?php checked( 'display', get_option( 'akismet_comment_form_privacy_notice' ) ); ?> />
												<span class="akismet-settings__row-label-text">
													<?php esc_html_e( 'Display a privacy notice under your comment forms.', 'akismet' ); ?>
												</span>
											</label>
										</div>
										<div>
											<label class="akismet-settings__row-input-label" for="akismet_comment_form_privacy_notice_hide">
												<input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_hide" value="hide" <?php echo in_array( get_option( 'akismet_comment_form_privacy_notice' ), array( 'display', 'hide' ), true ) ? checked( 'hide', get_option( 'akismet_comment_form_privacy_notice' ), false ) : 'checked="checked"'; ?> />
												<span class="akismet-settings__row-label-text">
													<?php esc_html_e( 'Do not display privacy notice.', 'akismet' ); ?>
												</span>
											</label>
										</div>
									</fieldset>

									<div class="akismet-settings__row-note">
										<?php esc_html_e( 'To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms.', 'akismet' ); ?>
									</div>
								</div>
							</div>
						</div>

						<div class="akismet-card-actions">
							<?php if ( ! Akismet::predefined_api_key() ) : ?>
								<div id="delete-action" class="akismet-card-actions__secondary-action">
									<a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e( 'Disconnect this account', 'akismet' ); ?></a>
								</div>
							<?php endif; ?>

							<?php wp_nonce_field( Akismet_Admin::NONCE ); ?>

							<div id="publishing-action">
								<input type="hidden" name="action" value="enter-key">
								<input type="submit" name="submit" id="submit" class="akismet-button akismet-could-be-primary" value="<?php esc_attr_e( 'Save changes', 'akismet' ); ?>">
							</div>
						</div>
					</form>
				</div>
			</div>

			<?php if ( ! Akismet::predefined_api_key() ) : ?>
				<div class="akismet-card">
					<div class="akismet-section-header">
						<h2 class="akismet-section-header__label">
							<span><?php esc_html_e( 'Account', 'akismet' ); ?></span>
						</h2>
					</div>

					<div class="inside">
						<table class="akismet-account">
							<tbody>
								<tr>
									<th scope="row"><?php esc_html_e( 'Subscription type', 'akismet' ); ?></th>
									<td>
										<?php echo esc_html( $akismet_user->account_name ); ?>
									</td>
								</tr>
								<tr>
									<th scope="row"><?php esc_html_e( 'Status', 'akismet' ); ?></th>
									<td>
										<?php
										if ( 'cancelled' === $akismet_user->status ) :
											esc_html_e( 'Cancelled', 'akismet' );
										elseif ( 'suspended' === $akismet_user->status ) :
											esc_html_e( 'Suspended', 'akismet' );
										elseif ( 'missing' === $akismet_user->status ) :
											esc_html_e( 'Missing', 'akismet' );
										elseif ( 'no-sub' === $akismet_user->status ) :
											esc_html_e( 'No subscription found', 'akismet' );
										else :
											esc_html_e( 'Active', 'akismet' );
										endif;
										?>
									</td>
								</tr>
								<?php if ( $akismet_user->next_billing_date ) : ?>
								<tr>
									<th scope="row"><?php esc_html_e( 'Next billing date', 'akismet' ); ?></th>
									<td>
										<?php echo esc_html( gmdate( 'F j, Y', $akismet_user->next_billing_date ) ); ?>
									</td>
								</tr>
								<?php endif; ?>
							</tbody>
						</table>
						<div class="akismet-card-actions">
							<?php if ( $akismet_user->status === 'active' ) : ?>
								<div class="akismet-card-actions__secondary-action">
									<a href="https://akismet.com/account" class="akismet-settings__external-link" aria-label="Account overview on akismet.com"><?php esc_html_e( 'Account overview', 'akismet' ); ?></a>
								</div>
							<?php endif; ?>
							<div id="publishing-action">
								<?php
								Akismet::view(
									'get',
									array(
										'text'     => ( $akismet_user->account_type === 'free-api-key' && $akismet_user->status === 'active' ? __( 'Upgrade', 'akismet' ) : __( 'Change', 'akismet' ) ),
										'redirect' => 'upgrade',
									)
								);
								?>
							</div>
						</div>
					</div>
				</div>
			<?php endif; ?>
		<?php endif; ?>
	</div>
</div>
connect-jp.php000064400000011741151537335020007325 0ustar00<?php

//phpcs:disable VariableAnalysis
// There are "undefined" variables here because they're defined in the code that includes this file as a template.

?>
<div class="akismet-box">
	<?php Akismet::view( 'title' ); ?>
	<div class="akismet-jp-connect">
		<h3><?php esc_html_e( 'Connect with Jetpack', 'akismet' ); ?></h3>
		<?php if ( in_array( $akismet_user->status, array( 'no-sub', 'missing' ) ) ) { ?>
			<p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
			<form name="akismet_activate" id="akismet_activate" action="https://akismet.com/get/" method="post" class="akismet-right" target="_blank">
				<input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
				<input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/>
				<input type="hidden" name="auto-connect" value="<?php echo esc_attr( $akismet_user->ID ); ?>"/>
				<input type="hidden" name="redirect" value="plugin-signup"/>
				<input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack', 'akismet' ); ?>"/>
			</form>
			<?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
			<p>
				<?php

				/* translators: %s is the WordPress.com username */
				printf( esc_html( __( 'You are connected as %s.', 'akismet' ) ), '<b>' . esc_html( $akismet_user->user_login ) . '</b>' );

				?>
				<br />
				<span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span>
			</p>
		<?php } elseif ( $akismet_user->status == 'cancelled' ) { ?>
			<p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
			<form name="akismet_activate" id="akismet_activate" action="https://akismet.com/get/" method="post" class="akismet-right" target="_blank">
				<input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
				<input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/>
				<input type="hidden" name="user_id" value="<?php echo esc_attr( $akismet_user->ID ); ?>"/>
				<input type="hidden" name="redirect" value="upgrade"/>
				<input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack', 'akismet' ); ?>"/>
			</form>
			<?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
			<p>
				<?php

				/* translators: %s is the WordPress.com email address */
				echo esc_html( sprintf( __( 'Your subscription for %s is cancelled.', 'akismet' ), $akismet_user->user_email ) );

				?>
				<br />
				<span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span>
			</p>
		<?php } elseif ( $akismet_user->status == 'suspended' ) { ?>
			<div class="akismet-right">
				<p><a href="https://akismet.com/contact" class="akismet-button akismet-is-primary"><?php esc_html_e( 'Contact Akismet support', 'akismet' ); ?></a></p>
			</div>
			<p>
				<span class="akismet-alert-text">
					<?php

					/* translators: %s is the WordPress.com email address */
					echo esc_html( sprintf( __( 'Your subscription for %s is suspended.', 'akismet' ), $akismet_user->user_email ) );

					?>
				</span>
				<?php esc_html_e( 'No worries! Get in touch and we&#8217;ll sort this out.', 'akismet' ); ?>
			</p>
		<?php } else { // ask do they want to use akismet account found using jetpack wpcom connection ?>
			<p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
			<form name="akismet_use_wpcom_key" action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-activate" class="akismet-right">
				<input type="hidden" name="key" value="<?php echo esc_attr( $akismet_user->api_key ); ?>"/>
				<input type="hidden" name="action" value="enter-key">
				<?php wp_nonce_field( Akismet_Admin::NONCE ); ?>
				<input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack', 'akismet' ); ?>"/>
			</form>
			<?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
			<p>
				<?php

				/* translators: %s is the WordPress.com username */
				printf( esc_html( __( 'You are connected as %s.', 'akismet' ) ), '<b>' . esc_html( $akismet_user->user_login ) . '</b>' );

				?>
				<br />
				<span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span>
			</p>
		<?php } ?>
	</div>
	<div class="akismet-ak-connect">
		<?php Akismet::view( 'setup' ); ?>
	</div>
	<div class="centered akismet-toggles">
		<a href="#" class="toggle-jp-connect"><?php esc_html_e( 'Connect with Jetpack', 'akismet' ); ?></a>
		<a href="#" class="toggle-ak-connect"><?php esc_html_e( 'Set up a different account', 'akismet' ); ?></a>
	</div>
</div>
<br/>
<div class="akismet-box">
	<?php Akismet::view( 'enter' ); ?>
</div>
enter.php000064400000002024151537335020006374 0ustar00<div class="akismet-enter-api-key-box centered">
	<button class="akismet-enter-api-key-box__reveal"><?php esc_html_e( 'Manually enter an API key', 'akismet' ); ?></button>
	<div class="akismet-enter-api-key-box__form-wrapper">
		<form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post">
			<?php wp_nonce_field( Akismet_Admin::NONCE ); ?>
			<input type="hidden" name="action" value="enter-key">
			<h3 class="akismet-enter-api-key-box__header" id="akismet-enter-api-key-box__header"><?php esc_html_e( 'Enter your API key', 'akismet' ); ?></h3>
			<div class="akismet-enter-api-key-box__input-wrapper">
				<input id="key" name="key" type="text" size="15" value="" placeholder="<?php esc_attr_e( 'API key', 'akismet' ); ?>" class="akismet-enter-api-key-box__key-input regular-text code" aria-labelledby="akismet-enter-api-key-box__header">
				<input type="submit" name="submit" id="submit" class="akismet-button" value="<?php esc_attr_e( 'Connect with API key', 'akismet' ); ?>">
			</div>
		</form>
	</div>
</div>
get.php000064400000002005151537335020006035 0ustar00<?php

//phpcs:disable VariableAnalysis
// There are "undefined" variables here because they're defined in the code that includes this file as a template.

$submit_classes_attr = 'akismet-button';

if ( isset( $classes ) && ( is_countable( $classes ) ? count( $classes ) : 0 ) > 0 ) {
	$submit_classes_attr = implode( ' ', $classes );
}
?>

<form name="akismet_activate" action="https://akismet.com/get/" method="POST" target="_blank">
	<input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
	<input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/>
	<input type="hidden" name="redirect" value="<?php echo isset( $redirect ) ? esc_attr( $redirect ) : 'plugin-signup'; ?>"/>
	<button type="submit" class="<?php echo esc_attr( $submit_classes_attr ); ?>" value="<?php echo esc_attr( $text ); ?>"><?php echo esc_attr( $text ) . '<span class="screen-reader-text">' . esc_html__( '(opens in a new tab)', 'akismet' ) . '</span>'; ?></button>
</form>
logo.php000064400000001402151537335020006216 0ustar00<?php
//phpcs:disable VariableAnalysis
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
?>
<div class="akismet-masthead__logo-container">
	<?php if ( isset( $include_logo_link ) && $include_logo_link === true ) : ?>
		<a href="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" class="akismet-masthead__logo-link">
	<?php endif; ?>
	<img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/akismet-refresh-logo@2x.png', __FILE__ ) ); ?>" srcset="<?php echo esc_url( plugins_url( '../_inc/img/akismet-refresh-logo.svg', __FILE__ ) ); ?>" alt="Akismet logo" />
	<?php if ( isset( $include_logo_link ) && $include_logo_link === true ) : ?>
		</a>
	<?php endif; ?>
</div>
notice.php000064400000036037151537335020006553 0ustar00<?php
//phpcs:disable VariableAnalysis
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
$kses_allow_link   = array(
	'a' => array(
		'href'   => true,
		'target' => true,
	),
);
$kses_allow_strong = array( 'strong' => true );

if ( ! isset( $type ) ) {
	$type = false; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
}

/*
 * Some notices (plugin, spam-check, spam-check-cron-disabled, alert and usage-limit) are also shown elsewhere in wp-admin, so have different classes applied so that they match the standard WordPress notice format.
 */
?>
<?php if ( $type === 'plugin' ) : ?>
	<?php // Displayed on edit-comments.php to users who have not set up Akismet yet. ?>
	<div class="updated" id="akismet-setup-prompt">
		<form name="akismet_activate" action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post">
			<div class="akismet-activate">
				<input type="submit" class="akismet-activate__button akismet-button" value="<?php esc_attr_e( 'Set up your Akismet account', 'akismet' ); ?>" />
				<div class="akismet-activate__description">
					<?php esc_html_e( 'Almost done! Configure Akismet and say goodbye to spam', 'akismet' ); ?>
				</div>
			</div>
		</form>
	</div>

<?php elseif ( $type === 'spam-check' ) : ?>
	<?php // This notice is only displayed on edit-comments.php. ?>
	<div class="notice notice-warning">
		<p><strong><?php esc_html_e( 'Akismet has detected a problem.', 'akismet' ); ?></strong></p>
		<p><?php esc_html_e( 'Some comments have not yet been checked for spam by Akismet. They have been temporarily held for moderation and will automatically be rechecked later.', 'akismet' ); ?></p>
		<?php if ( ! empty( $link_text ) ) : ?>
			<p><?php echo wp_kses( $link_text, $kses_allow_link ); ?></p>
		<?php endif; ?>
	</div>

<?php elseif ( $type === 'spam-check-cron-disabled' ) : ?>
	<?php // This notice is only displayed on edit-comments.php. ?>
	<div class="notice notice-warning">
		<p><strong><?php esc_html_e( 'Akismet has detected a problem.', 'akismet' ); ?></strong></p>
		<p><?php esc_html_e( 'WP-Cron has been disabled using the DISABLE_WP_CRON constant. Comment rechecks may not work properly.', 'akismet' ); ?></p>
	</div>

<?php elseif ( $type === 'alert' && $code === Akismet::ALERT_CODE_COMMERCIAL && $parent_view === 'config' ) : ?>
	<?php // Display a different commercial warning alert on the config page ?>
	<div class="akismet-card akismet-alert is-commercial">
		<div>
			<h3 class="akismet-alert-header"><?php esc_html_e( 'We detected commercial activity on your site', 'akismet' ); ?></h3>
			<p class="akismet-alert-info">
				<?php
					/* translators: The placeholder is a URL. */
					echo wp_kses( sprintf( __( 'Your current subscription is for <a href="%s">personal, non-commercial use</a>. Please upgrade your plan to continue using Akismet.', 'akismet' ), esc_url( 'https://akismet.com/support/getting-started/free-or-paid/' ) ), $kses_allow_link );
				?>
			</p>
			<p class="akismet-alert-info">
				<?php
					/* translators: The placeholder is a URL to the contact form. */
					echo wp_kses( sprintf( __( 'If you believe your site should not be classified as commercial, <a href="%s">please get in touch</a>.', 'akismet' ), esc_url( 'https://akismet.com/contact/?purpose=commercial' ) ), $kses_allow_link );
				?>
			</p>
		</div>
		<div class="akismet-alert-button-wrapper">
			<a href="https://akismet.com/pricing/?flow=upgrade&amp;utm_source=akismet_plugin&amp;utm_campaign=commercial_notice&amp;utm_medium=banner" class="akismet-alert-button akismet-button">
			<?php esc_html_e( 'Upgrade plan', 'akismet' ); ?>
			</a>
		</div>
	</div>

<?php elseif ( $type === 'alert' ) : ?>
<div class="<?php echo isset( $parent_view ) && $parent_view === 'config' ? 'akismet-alert is-bad' : 'error'; ?>">
	<?php /* translators: The placeholder is an error code returned by Akismet. */ ?>
	<p><strong><?php printf( esc_html__( 'Akismet error code: %s', 'akismet' ), esc_html( $code ) ); ?></strong></p>
	<p><?php echo isset( $msg ) ? esc_html( $msg ) : ''; ?></p>
	<p>
		<?php
		/* translators: the placeholder is a clickable URL that leads to more information regarding an error code. */
		printf( esc_html__( 'For more information: %s', 'akismet' ), '<a href="https://akismet.com/errors/' . esc_attr( $code ) . '">https://akismet.com/errors/' . esc_attr( $code ) . '</a>' );
		?>
	</p>
</div>

<?php elseif ( $type === 'notice' ) : ?>
<div class="akismet-alert is-bad">
	<h3 class="akismet-alert__heading"><?php echo wp_kses( $notice_header, Akismet_Admin::get_notice_kses_allowed_elements() ); ?></h3>
	<p>
		<?php echo wp_kses( $notice_text, Akismet_Admin::get_notice_kses_allowed_elements() ); ?>
	</p>
</div>

<?php elseif ( $type === 'missing-functions' ) : ?>
<div class="akismet-alert is-bad">
	<h3 class="akismet-alert__heading"><?php esc_html_e( 'Network functions are disabled.', 'akismet' ); ?></h3>
	<p>
		<?php
		/* translators: The placeholder is a URL. */
		echo wp_kses( sprintf( __( 'Your web host or server administrator has disabled PHP&#8217;s <code>gethostbynamel</code> function.  <strong>Akismet cannot work correctly until this is fixed.</strong>  Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet&#8217;s system requirements</a>.', 'akismet' ), esc_url( 'https://akismet.com/akismet-hosting-faq/' ) ), array_merge( $kses_allow_link, $kses_allow_strong, array( 'code' => true ) ) );
		?>
	</p>
</div>

<?php elseif ( $type === 'servers-be-down' ) : ?>
<div class="akismet-alert is-bad">
	<h3 class="akismet-alert__heading"><?php esc_html_e( 'Your site can&#8217;t connect to the Akismet servers.', 'akismet' ); ?></h3>
	<p>
	<?php
		/* translators: The placeholder is a URL. */
		echo wp_kses( sprintf( __( 'Your firewall may be blocking Akismet from connecting to its API. Please contact your host and refer to <a href="%s" target="_blank">our guide about firewalls</a>.', 'akismet' ), esc_url( 'https://akismet.com/akismet-hosting-faq/' ) ), $kses_allow_link );
	?>
	</p>
</div>

<?php elseif ( $type === 'active-dunning' ) : ?>
<div class="akismet-alert is-bad">
	<h3 class="akismet-alert__heading"><?php esc_html_e( 'Please update your payment information.', 'akismet' ); ?></h3>
	<p>
		<?php
		/* translators: The placeholder is a URL. */
		echo wp_kses( sprintf( __( 'We cannot process your payment. Please <a href="%s" target="_blank">update your payment details</a>.', 'akismet' ), esc_url( 'https://akismet.com/account/' ) ), $kses_allow_link );
		?>
	</p>
</div>

<?php elseif ( $type === 'cancelled' ) : ?>
<div class="akismet-alert is-bad">
	<h3 class="akismet-alert__heading"><?php esc_html_e( 'Your Akismet plan has been cancelled.', 'akismet' ); ?></h3>
	<p>
		<?php
		/* translators: The placeholder is a URL. */
		echo wp_kses( sprintf( __( 'Please visit your <a href="%s" target="_blank">Akismet account page</a> to reactivate your subscription.', 'akismet' ), esc_url( 'https://akismet.com/account/' ) ), $kses_allow_link );
		?>
	</p>
</div>

<?php elseif ( $type === 'suspended' ) : ?>
<div class="akismet-alert is-bad">
	<h3 class="akismet-alert__heading"><?php esc_html_e( 'Your Akismet subscription is suspended.', 'akismet' ); ?></h3>
	<p>
		<?php
		/* translators: The placeholder is a URL. */
		echo wp_kses( sprintf( __( 'Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.', 'akismet' ), esc_url( 'https://akismet.com/contact/' ) ), $kses_allow_link );
		?>
	</p>
</div>

<?php elseif ( $type === 'active-notice' && $time_saved ) : ?>
<div class="akismet-alert is-neutral">
	<h3 class="akismet-alert__heading"><?php echo esc_html( $time_saved ); ?></h3>
	<p>
		<?php
		/* translators: the placeholder is a clickable URL to the Akismet account upgrade page. */
		echo wp_kses( sprintf( __( 'You can help us fight spam and upgrade your account by <a href="%s" target="_blank">contributing a token amount</a>.', 'akismet' ), esc_url( 'https://akismet.com/pricing' ) ), $kses_allow_link );
		?>
	</p>
</div>

<?php elseif ( $type === 'missing' ) : ?>
<div class="akismet-alert is-bad">
	<h3 class="akismet-alert__heading"><?php esc_html_e( 'There is a problem with your API key.', 'akismet' ); ?></h3>
	<p>
		<?php
		/* translators: The placeholder is a URL to the Akismet contact form. */
		echo wp_kses( sprintf( __( 'Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.', 'akismet' ), esc_url( 'https://akismet.com/contact/' ) ), $kses_allow_link );
		?>
	</p>
</div>

<?php elseif ( $type === 'no-sub' ) : ?>
<div class="akismet-alert is-bad">
	<h3 class="akismet-alert__heading"><?php esc_html_e( 'You don&#8217;t have an Akismet plan.', 'akismet' ); ?></h3>
	<p><?php echo esc_html__( 'Your API key must have an Akismet plan before it can protect your site from spam.', 'akismet' ); ?></p>
	<p>
		<?php
		/* translators: the placeholder is the URL to the Akismet pricing page. */
		echo wp_kses( sprintf( __( 'Please <a href="%s" target="_blank">choose a plan</a> to get started with Akismet.', 'akismet' ), esc_url( 'https://akismet.com/pricing' ) ), $kses_allow_link );
		?>
	</p>
</div>

<?php elseif ( $type === 'new-key-valid' ) : ?>
	<?php
	global $wpdb;

	$check_pending_link = false;

	$at_least_one_comment_in_moderation = ! ! $wpdb->get_var( "SELECT comment_ID FROM {$wpdb->comments} WHERE comment_approved = '0' LIMIT 1" );

	if ( $at_least_one_comment_in_moderation ) {
		$check_pending_link = 'edit-comments.php?akismet_recheck=' . wp_create_nonce( 'akismet_recheck' );
	}
	?>
	<div class="akismet-alert is-good">
		<p><?php esc_html_e( 'Akismet is now protecting your site from spam.', 'akismet' ); ?></p>
		<?php if ( $check_pending_link ) : ?>
			<p>
				<?php
				echo wp_kses(
					sprintf(
						/* translators: The placeholder is a URL for checking pending comments. */
						__( 'Would you like to <a href="%s">check pending comments</a>?', 'akismet' ),
						esc_url( $check_pending_link )
					),
					$kses_allow_link
				);
				?>
			</p>
		<?php endif; ?>
	</div>

<?php elseif ( $type === 'new-key-invalid' ) : ?>
<div class="akismet-alert is-bad">
	<p><?php esc_html_e( 'The key you entered is invalid. Please double-check it.', 'akismet' ); ?></p>
</div>

<?php elseif ( $type === Akismet_Admin::NOTICE_EXISTING_KEY_INVALID ) : ?>
<div class="akismet-alert is-bad">
	<h3 class="akismet-alert__heading"><?php echo esc_html( __( 'Your API key is no longer valid.', 'akismet' ) ); ?></h3>
	<p>
		<?php
		echo wp_kses(
			sprintf(
				/* translators: The placeholder is a URL to the Akismet contact form. */
				__( 'Please enter a new key or <a href="%s" target="_blank">contact Akismet support</a>.', 'akismet' ),
				'https://akismet.com/contact/'
			),
			$kses_allow_link
		);
		?>
	</p>
</div>

<?php elseif ( $type === 'new-key-failed' ) : ?>
<div class="akismet-alert is-bad">
	<h3 class="akismet-alert__heading"><?php esc_html_e( 'The API key you entered could not be verified.', 'akismet' ); ?></h3>
	<p>
		<?php
		echo wp_kses(
			sprintf(
				/* translators: The placeholder is a URL. */
				__( 'The connection to akismet.com could not be established. Please refer to <a href="%s" target="_blank">our guide about firewalls</a> and check your server configuration.', 'akismet' ),
				'https://blog.akismet.com/akismet-hosting-faq/'
			),
			$kses_allow_link
		);
		?>
	</p>
</div>

<?php elseif ( $type === 'usage-limit' && isset( Akismet::$limit_notices[ $code ] ) ) : ?>
<div class="error akismet-usage-limit-alert">
	<div class="akismet-usage-limit-logo">
		<img src="<?php echo esc_url( plugins_url( '../_inc/img/logo-a-2x.png', __FILE__ ) ); ?>" alt="Akismet logo" />
	</div>
	<div class="akismet-usage-limit-text">
		<h3>
		<?php
		switch ( Akismet::$limit_notices[ $code ] ) {
			case 'FIRST_MONTH_OVER_LIMIT':
			case 'SECOND_MONTH_OVER_LIMIT':
				esc_html_e( 'Your Akismet account usage is over your plan&#8217;s limit', 'akismet' );
				break;
			case 'THIRD_MONTH_APPROACHING_LIMIT':
				esc_html_e( 'Your Akismet account usage is approaching your plan&#8217;s limit', 'akismet' );
				break;
			case 'THIRD_MONTH_OVER_LIMIT':
			case 'FOUR_PLUS_MONTHS_OVER_LIMIT':
				esc_html_e( 'Your account has been restricted', 'akismet' );
				break;
			default:
		}
		?>
		</h3>
		<p>
		<?php
		switch ( Akismet::$limit_notices[ $code ] ) {
			case 'FIRST_MONTH_OVER_LIMIT':
				echo esc_html(
					sprintf(
						/* translators: The first placeholder is a date, the second is a (formatted) number, the third is another formatted number. */
						__( 'Since %1$s, your account made %2$s API calls, compared to your plan&#8217;s limit of %3$s.', 'akismet' ),
						esc_html( gmdate( 'F' ) . ' 1' ),
						number_format( $api_calls ),
						number_format( $usage_limit )
					)
				);
				echo '&nbsp;';
				echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">';
				echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) );
				echo '</a>';

				break;
			case 'SECOND_MONTH_OVER_LIMIT':
				echo esc_html( __( 'Your Akismet usage has been over your plan&#8217;s limit for two consecutive months. Next month, we will restrict your account after you reach the limit. Please consider upgrading your plan.', 'akismet' ) );
				echo '&nbsp;';
				echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">';
				echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) );
				echo '</a>';

				break;
			case 'THIRD_MONTH_APPROACHING_LIMIT':
				echo esc_html( __( 'Your Akismet usage is nearing your plan&#8217;s limit for the third consecutive month. We will restrict your account after you reach the limit. Upgrade your plan so Akismet can continue blocking spam.', 'akismet' ) );
				echo '&nbsp;';
				echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">';
				echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) );
				echo '</a>';

				break;
			case 'THIRD_MONTH_OVER_LIMIT':
			case 'FOUR_PLUS_MONTHS_OVER_LIMIT':
				echo esc_html( __( 'Your Akismet usage has been over your plan&#8217;s limit for three consecutive months. We have restricted your account for the rest of the month. Upgrade your plan so Akismet can continue blocking spam.', 'akismet' ) );
				echo '&nbsp;';
				echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">';
				echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) );
				echo '</a>';

				break;

			default:
		}
		?>
		</p>
	</div>
	<div class="akismet-usage-limit-cta">
		<a href="<?php echo esc_attr( $upgrade_url ); ?>" class="button" target="_blank">
			<?php
			if ( isset( $upgrade_via_support ) && $upgrade_via_support ) {
				// Direct user to contact support.
				esc_html_e( 'Contact Akismet support', 'akismet' );
			} elseif ( ! empty( $upgrade_type ) && 'qty' === $upgrade_type ) {
				// If only a qty upgrade is required, show a more generic message.
				esc_html_e( 'Upgrade your subscription level', 'akismet' );
			} else {
				echo esc_html(
					sprintf(
						/* translators: The placeholder is the name of a subscription level, like "Plus" or "Enterprise" . */
						__( 'Upgrade to %s', 'akismet' ),
						$upgrade_plan
					)
				);
			}
			?>
		</a>
	</div>
</div>
<?php endif; ?>
predefined.php000064400000000470151537335020007367 0ustar00<div class="akismet-box">
	<h2><?php esc_html_e( 'Manual Configuration', 'akismet' ); ?></h2>
	<p>
		<?php

		/* translators: %s is the wp-config.php file */
		printf( esc_html__( 'An Akismet API key has been defined in the %s file for this site.', 'akismet' ), '<code>wp-config.php</code>' );

		?>
	</p>
</div>setup.php000064400000000521151537335020006417 0ustar00<div class="akismet-setup-instructions">
	<p><?php esc_html_e( 'Set up your Akismet account to enable spam filtering on this site.', 'akismet' ); ?></p>
	<?php
	Akismet::view(
		'get',
		array(
			'text'    => __( 'Choose an Akismet plan', 'akismet' ),
			'classes' => array( 'akismet-button', 'akismet-is-primary' ),
		)
	);
	?>
</div>
start.php000064400000001461151537335020006420 0ustar00<?php

//phpcs:disable VariableAnalysis
// There are "undefined" variables here because they're defined in the code that includes this file as a template.

?>
<div id="akismet-plugin-container">
	<div class="akismet-masthead">
		<div class="akismet-masthead__inside-container">
			<?php Akismet::view( 'logo' ); ?>
		</div>
	</div>
	<div class="akismet-lower">
		<?php Akismet_Admin::display_status(); ?>
		<div class="akismet-boxes">
			<?php

			if ( Akismet::predefined_api_key() ) {
				Akismet::view( 'predefined' );
			} elseif ( $akismet_user && in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub', 'missing', 'cancelled', 'suspended' ) ) ) {
				Akismet::view( 'connect-jp', compact( 'akismet_user' ) );
			} else {
				Akismet::view( 'activate' );
			}

			?>
		</div>
	</div>
</div>stats.php000064400000002100151537335020006410 0ustar00<div id="akismet-plugin-container">
	<div class="akismet-masthead">
		<div class="akismet-masthead__inside-container">
			<?php Akismet::view( 'logo', array( 'include_logo_link' => true ) ); ?>
			<div class="akismet-masthead__back-link-container">
				<a class="akismet-masthead__back-link" href="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"><?php esc_html_e( 'Back to settings', 'akismet' ); ?></a>
			</div>
		</div>
	</div>
	<?php /* name attribute on iframe is used as a cache-buster here to force Firefox to load the new style charts: https://bugzilla.mozilla.org/show_bug.cgi?id=356558 */ ?>
	<iframe id="stats-iframe" src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/user-stats.php?blog=%s&token=%s&locale=%s&is_redecorated=1', urlencode( get_option( 'home' ) ), urlencode( Akismet::get_access_token() ), esc_attr( get_user_locale() ) ) ); ?>" name="<?php echo esc_attr( 'user-stats- ' . filemtime( __FILE__ ) ); ?>" width="100%" height="2500px" frameborder="0" title="<?php echo esc_attr__( 'Akismet detailed stats', 'akismet' ); ?>"></iframe>
</div>
title.php000064400000000175151537335020006405 0ustar00<div class="centered akismet-box-header">
	<h2><?php esc_html_e( 'Eliminate spam from your site', 'akismet' ); ?></h2>
</div>import.php000064400000006764151540164150006606 0ustar00<?php
/**
 * HTML for the Import Snippets page.
 *
 * @package    Code_Snippets
 * @subpackage Views
 */

namespace Code_Snippets;

/**
 * Loaded from import menu.
 *
 * @var Import_Menu $this
 */

if ( ! defined( 'ABSPATH' ) ) {
	return;
}

$max_size_bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );

?>
<div class="wrap">
	<h1>
		<?php

		esc_html_e( 'Import Snippets', 'code-snippets' );

		if ( code_snippets()->is_compact_menu() ) {
			$this->render_page_title_actions( [ 'manage', 'add', 'settings' ] );
		}

		?>
	</h1>

	<?php $this->print_messages(); ?>

	<div class="narrow">

		<p><?php esc_html_e( 'Upload one or more Code Snippets export files and the snippets will be imported.', 'code-snippets' ); ?></p>

		<p>
			<?php
			    /* translators: %s: link to snippets admin menu */
			    $text = __( 'Afterward, you will need to visit the <a href="%s" >All Snippets</a> page to activate the imported snippets.', 'code-snippets' );
			    $url = esc_url( code_snippets()->get_menu_url( 'manage' ) );
			
			    echo wp_kses(
			        sprintf( $text, $url ),
			        array(
			            'a' => array(
			                'href' => array(),
					'target' => array(),
			            )
			        )
			    );
			    ?>
		</p>


		<form enctype="multipart/form-data" id="import-upload-form" method="post" class="wp-upload-form"
		      name="code_snippets_import">
			<?php wp_nonce_field( 'import_code_snippets_file' ); ?>

			<h2><?php esc_html_e( 'Duplicate Snippets', 'code-snippets' ); ?></h2>

			<p class="description">
				<?php esc_html_e( 'What should happen if an existing snippet is found with an identical name to an imported snippet?', 'code-snippets' ); ?>
			</p>

			<fieldset>
				<p>
					<label>
						<input type="radio" name="duplicate_action" value="ignore" checked="checked">
						<?php esc_html_e( 'Ignore any duplicate snippets: import all snippets from the file regardless and leave all existing snippets unchanged.', 'code-snippets' ); ?>
					</label>
				</p>

				<p>
					<label>
						<input type="radio" name="duplicate_action" value="replace">
						<?php esc_html_e( 'Replace any existing snippets with a newly imported snippet of the same name.', 'code-snippets' ); ?>
					</label>
				</p>

				<p>
					<label>
						<input type="radio" name="duplicate_action" value="skip">
						<?php esc_html_e( 'Do not import any duplicate snippets; leave all existing snippets unchanged.', 'code-snippets' ); ?>
					</label>
				</p>
			</fieldset>

			<h2><?php esc_html_e( 'Upload Files', 'code-snippets' ); ?></h2>

			<p class="description">
				<?php esc_html_e( 'Choose one or more Code Snippets (.xml or .json) files to upload, then click "Upload files and import".', 'code-snippets' ); ?>
			</p>

			<fieldset>
				<p>
					<label for="upload"><?php esc_html_e( 'Choose files from your computer:', 'code-snippets' ); ?></label>
					<?php
					/* translators: %s: size in bytes */
					printf( esc_html__( '(Maximum size: %s)', 'code-snippets' ), esc_html( size_format( $max_size_bytes ) ) ); ?>
					<input type="file" id="upload" name="code_snippets_import_files[]" size="25"
					       accept="application/json,.json,text/xml" multiple="multiple">
					<input type="hidden" name="action" value="save">
					<input type="hidden" name="max_file_size" value="<?php echo esc_attr( $max_size_bytes ); ?>">
				</p>
			</fieldset>

			<?php

			do_action( 'code_snippets/admin/import_form' );
			submit_button( __( 'Upload files and import', 'code-snippets' ) );

			?>
		</form>
	</div>
</div>
manage.php000064400000007537151540164150006523 0ustar00<?php
/**
 * HTML for the Manage Snippets page.
 *
 * @package    Code_Snippets
 * @subpackage Views
 */

namespace Code_Snippets;

/**
 * Loaded from the manage menu class.
 *
 * @var Manage_Menu $this
 */

if ( ! defined( 'ABSPATH' ) ) {
	return;
}

$types = array_merge( [ 'all' => __( 'All Snippets', 'code-snippets' ) ], Plugin::get_types() );
$current_type = $this->get_current_type();

if ( false !== strpos( code_snippets()->version, 'beta' ) ) {
	echo '<div class="notice beta-test-notice"><p id="beta-testing">';
	echo wp_kses(
		__( 'Thank you for testing this <span class="highlight-yellow">beta version of Code Snippets</span>. We would love to hear your feedback.', 'code-snippets' ),
		[ 'span' => [ 'class' => [ 'highlight-yellow' ] ] ]
	);

	$feedback_url = __( 'mailto:team@codesnippets.pro?subject=Code Snippet Beta Test Feedback', 'code-snippets' );
	printf( ' <a href="%s">%s</a>', esc_url( $feedback_url ), esc_html__( 'Click here to submit your feedback', 'code-snippets' ) );
	echo '</p></div>';
}

?>

<div class="wrap">
	<h1>
		<?php
		esc_html_e( 'Snippets', 'code-snippets' );

		$this->render_page_title_actions( code_snippets()->is_compact_menu() ? [ 'add', 'import', 'settings' ] : [ 'add', 'import' ] );

		$this->list_table->search_notice();
		?>
	</h1>

	<?php $this->print_messages(); ?>

	<h2 class="nav-tab-wrapper" id="snippet-type-tabs">
		<?php

		foreach ( $types as $type_name => $label ) {
			Admin::render_snippet_type_tab( $type_name, $label, $current_type );
		}

		?>
		<a class="button button-large nav-tab-button nav-tab-inactive go-pro-button"
		   href="https://codesnippets.pro/pricing/" target="_blank"
		   title="<?php esc_html_e( 'Find more about Pro (opens in external tab)', 'code-snippets' ); ?>">
			<?php echo wp_kses( __( 'Upgrade to <span class="badge">Pro</span>', 'code-snippets' ), [ 'span' => [ 'class' => 'badge' ] ] ); ?>
			<span class="dashicons dashicons-external"></span>
		</a>
	</h2>

	<?php

	$type_info = [
		'php'   => [
			__( 'Function snippets are run on your site as if there were in a plugin or theme functions.php file.', 'code-snippets' ),
			__( 'Learn more about function snippets &rarr;', 'code-snippets' ),
			'https://codesnippets.pro/learn-php/',
		],
		'html'  => [
			__( 'Content snippets are bits of reusable PHP and HTML content that can be inserted into posts and pages.', 'code-snippets' ),
			__( 'Learn more about content snippets &rarr;', 'code-snippets' ),
			'https://codesnippets.pro/learn-html/',
		],
		'css'   => [
			__( 'Style snippets are written in CSS and loaded in the admin area or on the site front-end, just like the theme style.css.', 'code-snippets' ),
			esc_html__( 'Learn more about style snippets &rarr;', 'code-snippets' ),
			'https://codesnippets.pro/learn-css/',
		],
		'js'    => [
			__( 'Script snippets are loaded on the site front-end in a JavaScript file, either in the head or body sections.', 'code-snippets' ),
			__( 'Learn more about javascript snippets &rarr;', 'code-snippets' ),
			'https://codesnippets.pro/learn-js/',
		],
		'cloud' => [
			__( 'See all your public and private snippets that are stored in your Code Snippet Cloud codevault.', 'code-snippets' ),
			__( 'Learn more about Code Snippets Cloud &rarr;', 'code-snippets' ),
			'https://codesnippets.cloud/getstarted/',
		],
	];


	if ( isset( $type_info[ $current_type ] ) ) {
		$info = $type_info[ $current_type ];

		printf(
			'<p class="snippet-type-description">%s <a href="%s" target="_blank">%s</a></p>',
			esc_html( $info[0] ),
			esc_url( $info[2] ),
			esc_html( $info[1] )
		);
	}

	do_action( 'code_snippets/admin/manage/before_list_table' );
	$this->list_table->views();

	switch ( $current_type ) {
		case 'cloud_search':
			include_once 'partials/cloud-search.php';
			break;

		default:
			include_once 'partials/list-table.php';
			break;
	}

	do_action( 'code_snippets/admin/manage', $current_type );

	?>
</div>
partials/cloud-search.php000064400000005003151540164150011445 0ustar00<?php
/**
 * HTML for the cloud search tab
 *
 * @package    Code_Snippets
 * @subpackage Views
 */

namespace Code_Snippets;

/**
 * Loaded from manage menu.
 *
 * @var Manage_Menu $this
 */

$search_query = isset( $_REQUEST['cloud_search'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['cloud_search'] ) ) : '';
$cloud_select = sanitize_key( wp_unslash( $_REQUEST['cloud_select'] ?? '' ) );

?>

<p class="cloud-search-info">
	<?php esc_html_e( 'Use the search bar below to search cloud snippets by entering either the name of a codevault or keywords.', 'code-snippets' ); ?>

	<small>
		<?php esc_html_e( '(Note: codevault name is case and spelling sensitive and only public snippets will be shown)', 'code-snippets' ); ?>
	</small>
</p>

<form method="get" action="" id="cloud-search-form">
	<?php List_Table::required_form_fields( 'search_box' ); ?>
	<label class="screen-reader-text" for="cloud_search">
		<?php esc_html_e( 'Search cloud snippets', 'code-snippets' ); ?>
	</label>
	<?php
	if ( isset( $_REQUEST['type'] ) ) {
		printf( '<input type="hidden" name="type" value="%s">', esc_attr( sanitize_text_field( wp_unslash( $_REQUEST['type'] ) ) ) );
	}
	?>
	<div class="heading-box">
		<p class="cloud-search-heading">
			<label for="cloud-select-prepend"><?php esc_html_e( 'Search Cloud', 'code-snippets' ); ?></label>
		</p>
	</div>
	<div class="input-group">
		<select id="cloud-select-prepend" class="select-prepend" name="cloud_select">
			<option value="term"<?php selected( $cloud_select, 'term' ); ?>>
				<?php esc_html_e( 'Search by keyword(s)', 'code-snippets' ); ?>
			</option>
			<option value="codevault"<?php selected( $cloud_select, 'codevault' ); ?>>
				<?php esc_html_e( 'Name of codevault', 'code-snippets' ); ?>
			</option>
		</select>
		<input type="text" id="cloud_search" name="cloud_search" class="cloud_search"
		       value="<?php echo esc_html( $search_query ); ?>"
		       placeholder="<?php esc_html_e( 'e.g. Remove unused javascript…', 'code-snippets' ); ?>">

		<button type="submit" id="cloud-search-submit" class="button">
			<?php esc_html_e( 'Search Cloud', 'code-snippets' ); ?>
			<span class="dashicons dashicons-search cloud-search"></span>
		</button>
	</div>
</form>
<form method="post" action="" id="cloud-search-results">
	<input type="hidden"
	       id="code_snippets_ajax_nonce"
	       value="<?php echo esc_attr( wp_create_nonce( 'code_snippets_manage_ajax' ) ); ?>">
	<?php
	List_Table::required_form_fields();

	if ( $search_query ) {
		$this->cloud_search_list_table->display();
	}

	?>
</form>
partials/list-table-notices.php000064400000004061151540164150012601 0ustar00<?php
/**
 * HTML for displaying notices for the manage table.
 *
 * @package    Code_Snippets
 * @subpackage Views
 */

namespace Code_Snippets;

/**
 * Loaded from the manage menu.
 *
 * @var Manage_Menu $this
 */

if ( defined( 'CODE_SNIPPETS_SAFE_MODE' ) && CODE_SNIPPETS_SAFE_MODE ) {
	?>
	<div id="message" class="notice notice-error fade is-dismissible">
		<p>
			<?php echo wp_kses_post( __( '<strong>Warning:</strong> Safe mode is active and snippets will not execute! Remove the <code>CODE_SNIPPETS_SAFE_MODE</code> constant from <code>wp-config.php</code> to turn off safe mode.', 'code-snippets' ) ); ?>

			<a href="https://help.codesnippets.pro/article/12-safe-mode" target="_blank">
				<?php esc_html_e( 'Help', 'code-snippets' ); ?>
			</a>
		</p>
	</div>
	<?php
}

if ( empty( $_REQUEST['result'] ) ) {
	return;
}

$result = sanitize_key( $_REQUEST['result'] );

$result_messages = apply_filters(
	'code_snippets/manage/result_messages',
	[
		'executed'          => __( 'Snippet <strong>executed</strong>.', 'code-snippets' ),
		'activated'         => __( 'Snippet <strong>activated</strong>.', 'code-snippets' ),
		'activated-multi'   => __( 'Selected snippets <strong>activated</strong>.', 'code-snippets' ),
		'deactivated'       => __( 'Snippet <strong>deactivated</strong>.', 'code-snippets' ),
		'deactivated-multi' => __( 'Selected snippets <strong>deactivated</strong>.', 'code-snippets' ),
		'deleted'           => __( 'Snippet <strong>deleted</strong>.', 'code-snippets' ),
		'deleted-multi'     => __( 'Selected snippets <strong>deleted</strong>.', 'code-snippets' ),
		'cloned'            => __( 'Snippet <strong>cloned</strong>.', 'code-snippets' ),
		'cloned-multi'      => __( 'Selected snippets <strong>cloned</strong>.', 'code-snippets' ),
		'cloud-refreshed'   => __( 'Synced cloud data has been <strong>successfully</strong> refreshed.', 'code-snippets' ),
	]
);

if ( isset( $result_messages[ $result ] ) ) {
	printf(
		'<div id="message" class="notice notice-success fade is-dismissible"><p>%s</p></div>',
		wp_kses_post( $result_messages[ $result ] )
	);
}
partials/list-table.php000064400000001241151540164150011134 0ustar00<?php
/**
 * HTML for the all snippets and codevault list table
 *
 * @package    Code_Snippets
 * @subpackage Views
 */

namespace Code_Snippets;

/**
 * Loaded from the manage menu.
 *
 * @var Manage_Menu $this
 */

?>

<form method="get" action="">
	<?php
	List_Table::required_form_fields( 'search_box' );
	$this->list_table->search_box( __( 'Search Snippets', 'code-snippets' ), 'search_id' );
	?>
</form>

<form method="post" action="">
	<input type="hidden" id="code_snippets_ajax_nonce"
	       value="<?php echo esc_attr( wp_create_nonce( 'code_snippets_manage_ajax' ) ); ?>">
	<?php
	List_Table::required_form_fields();
	$this->list_table->display();
	?>
</form>
welcome.php000064400000015547151540164150006726 0ustar00<?php
/**
 * HTML for the welcome page.
 *
 * @package    Code_Snippets
 * @subpackage Views
 */

namespace Code_Snippets;

/**
 * Loaded from the Welcome_Menu class.
 *
 * @var Welcome_Menu $this
 */

if ( ! defined( 'ABSPATH' ) ) {
	return;
}

$hero = $this->api->get_hero_item();

$changelog_sections = [
	'Added'    => [
		'title' => __( 'New features', 'code-snippets' ),
		'icon'  => 'lightbulb',
	],
	'Improved' => [
		'title' => __( 'Improvements', 'code-snippets' ),
		'icon'  => 'chart-line',
	],
	'Fixed'    => [
		'title' => __( 'Bug fixes', 'code-snippets' ),
		'icon'  => 'buddicons-replies',
	],
	'Other'    => [
		'title' => __( 'Other', 'code-snippets' ),
		'icon'  => 'open-folder',
	],
];

$plugin_types = [
	'core' => _x( 'Core', 'badge label', 'code-snippets' ),
	'pro'  => _x( 'Pro', 'badge label', 'code-snippets' ),
];

?>

<div class="csp-welcome-wrap">
	<div class="csp-welcome-header">
		<header class="csp-welcome-logo">
			<img width="50px"
			     src="<?php echo esc_url( plugins_url( 'assets/icon.svg', PLUGIN_FILE ) ); ?>"
			     alt="<?php esc_attr_e( 'Code Snippets Logo', 'code-snippets' ); ?>">
			<h1>
				<?php echo wp_kses( __( "Resources and <span>What's New</span>", 'code-snippets' ), [ 'span' => [] ] ); ?>
			</h1>
		</header>
		<ul class="csp-welcome-nav">
			<?php foreach ( $this->get_header_links() as $link_name => $link_info ) { ?>
				<li>
					<a href="<?php echo esc_url( $link_info['url'] ); ?>" target="_blank"
					   class="csp-link-<?php echo esc_attr( $link_name ); ?>">
						<span><?php echo esc_html( $link_info['label'] ); ?></span>

						<?php if ( 'discord' === $link_info['icon'] ) { ?>
							<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 127.14 96.36">
								<path d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z" />
							</svg>
						<?php } else { ?>
							<span class="dashicons dashicons-<?php echo esc_attr( $link_info['icon'] ); ?>"></span>
						<?php } ?>
					</a>
				</li>
			<?php } ?>
		</ul>
	</div>

	<section class="csp-section-changes">
		<h1>📰 <?php esc_html_e( 'Latest news', 'code-snippets' ); ?></h1>
		<div class="csp-cards">
			<a class="csp-card" href="<?php echo esc_url( $hero['follow_url'] ); ?>" target="_blank"
			   title="<?php esc_html_e( 'Read more', 'code-snippets' ); ?>">
				<header>
					<span class="dashicons dashicons-external"></span>
					<h2><?php echo esc_html( $hero['name'] ); ?></h2>
				</header>
				<figure>
					<div id="csp-loading-spinner" class="csp-loading-spinner"></div>
					<img id="csp-changes-img"
					     onload="hideLoadingAnimation()"
					     src="<?php echo esc_url( $hero['image_url'] ); ?>"
					     alt="<?php esc_attr_e( 'Latest news image', 'code-snippets' ); ?>);">
				</figure>
			</a>

			<a class="csp-card" href="https://wordpress.org/plugins/code-snippets/changelog" target="_blank"
			   title="<?php esc_html_e( 'Read the full changelog', 'code-snippets' ); ?>">
				<header>
					<span class="dashicons dashicons-external"></span>
					<h2><?php esc_html_e( 'Latest changes', 'code-snippets' ); ?></h2>
				</header>
				<div class="csp-section-changelog">
					<?php foreach ( $this->api->get_changelog() as $version => $version_changes ) { ?>
						<h3><?php echo esc_html( $version ); ?></h3>
						<article>
							<?php
							foreach ( $changelog_sections as $section_key => $section ) {
								if ( empty( $version_changes[ $section_key ] ) ) {
									continue;
								}
								?>
								<h4>
									<span class="dashicons dashicons-<?php echo esc_attr( $section['icon'] ); ?>"></span>
									<?php echo esc_html( $section['title'] ); ?>
								</h4>
								<ul>
									<?php
									foreach ( $plugin_types as $plugin_type => $type_label ) {
										if ( empty( $version_changes[ $section_key ][ $plugin_type ] ) ) {
											continue;
										}

										foreach ( $version_changes[ $section_key ][ $plugin_type ] as $change ) {
											?>
											<li>
												<span class="badge <?php echo esc_attr( $plugin_type ); ?>-badge">
													<?php echo esc_html( $type_label ); ?>
												</span>
												<span><?php echo esc_html( $change ); ?></span>
											</li>
											<?php
										}
									}
									?>
								</ul>
							<?php } ?>
						</article>
					<?php } ?>
				</div>
			</a>
		</div>
	</section>

	<section class="csp-section-articles csp-section-links">
		<h1>🛟 <?php esc_html_e( 'Helpful articles', 'code-snippets' ); ?></h1>
		<div class="csp-cards">
			<?php foreach ( $this->api->get_features() as $feature ) { ?>
				<a class="csp-card"
				   href="<?php echo esc_url( $feature['follow_url'] ); ?>" target="_blank"
				   title="<?php esc_html_e( 'Read more', 'code-snippets' ); ?>">
					<figure>
						<img src="<?php echo esc_url( $feature['image_url'] ); ?>"
						     alt="<?php esc_attr_e( 'Feature image', 'code-snippets' ); ?>">
					</figure>
					<header>
						<h2><?php echo esc_html( $feature['title'] ); ?></h2>
						<p class="csp-card-item-description"><?php echo esc_html( $feature['description'] ); ?></p>
					</header>
					<footer>
						<p class="csp-card-item-category"><?php echo esc_html( $feature['category'] ); ?></p>
						<span class="dashicons dashicons-external"></span>
					</footer>
				</a>
			<?php } ?>
		</div>
	</section>

	<section class="csp-section-links csp-section-partners">
		<h1>🚀 <?php esc_html_e( 'Partners and apps', 'code-snippets' ); ?></h1>
		<div class="csp-cards">
			<?php foreach ( $this->api->get_partners() as $partner ) { ?>
				<a class="csp-card"
				   href="<?php echo esc_url( $partner['follow_url'] ); ?>" target="_blank"
				   title="<?php esc_attr_e( 'Go to Partner', 'code-snippets' ); ?>">
					<figure>
						<img src="<?php echo esc_url( $partner['image_url'] ); ?>"
						     alt="<?php esc_attr_e( 'Partner image', 'code-snippets' ); ?>">
					</figure>
					<header>
						<span class="dashicons dashicons-external"></span>
						<h2><?php echo esc_html( $partner['title'] ); ?></h2>
					</header>
				</a>
			<?php } ?>
		</div>
	</section>
</div>

<script type="text/javascript">
	function hideLoadingAnimation() {
		const spinner = document.getElementById<HTMLDivElement>('csp-loading-spinner')
		const image = document.getElementById<HTMLDivElement>('csp-changes-img')

		spinner.style.display = 'none'
		image.style.display = 'block'
	}
</script>
html-admin-options.php000064400000001507151550330500011000 0ustar00<?php
/**
 * Admin View: Page - Admin options.
 *
 * @package WooCommerce\Integrations
 */

defined( 'ABSPATH' ) || exit;

?>

<table class="form-table">
	<tr valign="top">
		<th scope="row" class="titledesc">
			<label><?php esc_html_e( 'Database File Path', 'woocommerce' ); ?></label>
		</th>
		<td class="forminp">
			<fieldset>
				<legend class="screen-reader-text"><span><?php esc_html_e( 'Database File Path', 'woocommerce' ); ?></span></legend>
				<input class="input-text regular-input" type="text" value="<?php echo esc_attr( $this->database_service->get_database_path() ); ?>" readonly>
				<p class="description"><?php esc_html_e( 'The location that the MaxMind database should be stored. By default, the integration will automatically save the database here.', 'woocommerce' ); ?></p>
			</fieldset>
		</td>
	</tr>
</table>
html-admin-dashboard-setup.php000064400000004026151551052230012373 0ustar00<?php
/**
 * Admin View: Dashboard - Finish Setup
 *
 * @package WooCommerce\Admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div class="dashboard-widget-finish-setup" data-current-step="<?php echo esc_html( $step_number - 1 ); ?>" data-total-steps="<?php echo esc_html( $tasks_count ); ?>">
	<span class='progress-wrapper'>
		<svg class="circle-progress" width="17" height="17" version="1.1" xmlns="http://www.w3.org/2000/svg">
		  <circle r="6.5" cx="10" cy="10" fill="transparent" stroke-dasharray="40.859" stroke-dashoffset="0"></circle>
		  <circle class="bar" r="6.5" cx="190" cy="10" fill="transparent" stroke-dasharray="40.859" stroke-dashoffset="<?php echo esc_attr( $circle_dashoffset ); ?>" transform='rotate(-90 100 100)'></circle>
		</svg>
		<span><?php echo esc_html_e( 'Step', 'woocommerce' ); ?> <?php echo esc_html( $step_number ); ?> <?php echo esc_html_e( 'of', 'woocommerce' ); ?> <?php echo esc_html( $tasks_count ); ?></span>
	</span>

	<div class="description">
		<div>
			<?php echo esc_html_e( 'You\'re almost there! Once you complete store setup you can start receiving orders.', 'woocommerce' ); ?>
			<div><a href='<?php echo esc_attr( $button_link ); ?>' class='button button-primary'><?php echo esc_html_e( 'Start selling', 'woocommerce' ); ?></a></div>
		</div>
		<img src="<?php echo esc_url( WC()->plugin_url() ); ?>/assets/images/dashboard-widget-setup.png" />
	</div>
	<div class="clear"></div>
</div>

<script type="text/javascript">
	/*global jQuery */
	(function( $ ) {
		const widget = $( '.dashboard-widget-finish-setup' );
		const currentStep = widget.data( 'current-step' );
		const totalSteps = widget.data( 'total-steps' );

		$( function() {
			window.wcTracks.recordEvent( 'wcadmin_setup_widget_view', {
				completed_tasks: currentStep,
				total_tasks: totalSteps,
			} );
		});


		$( '.dashboard-widget-finish-setup a' ).on( 'click', function() {
			window.wcTracks.recordEvent( 'wcadmin_setup_widget_click', {
				completed_tasks: currentStep,
				total_tasks: totalSteps,
			} );
		});
	})( jQuery );
</script>
html-admin-page-addons-category-nav.php000064400000002116151551052230014063 0ustar00<?php
/**
 * Admin View: Page - Addons - category navigation
 *
 * @package WooCommerce\Admin
 * @var array  $sections
 * @var string $current_section
 * @var string $current_section_name
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div id="marketplace-current-section-dropdown" class="current-section-dropdown">
	<h2 class="current-section-dropdown__title"><?php esc_html_e( 'Browse categories', 'woocommerce' ); ?></h2>
	<ul>
		<?php foreach ( $sections as $section ) : ?>
			<?php
			if ( $current_section === $section->slug && '_featured' !== $section->slug ) {
				$current_section_name = $section->label;
			}
			?>
			<?php if ( $current_section === $section->slug ) : ?>
				<li class="current">
			<?php else: ?>
				<li>
			<?php endif; ?>
			<a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-addons&section=' . esc_attr( $section->slug ) ) ); ?>">
				<?php echo esc_html( $section->label ); ?>
			</a>
			</li>
		<?php endforeach; ?>
	</ul>
	<div id="marketplace-current-section-name" class="current-section-name"><?php echo esc_html( $current_section_name ); ?></div>
</div>
html-admin-page-addons.php000064400000013607151551052230011475 0ustar00<?php
/**
 * Admin View: Page - Addons
 *
 * @package WooCommerce\Admin
 * @var string $view
 * @var object $addons
 * @var object $promotions
 * @var array $sections
 * @var string $current_section
 */

use Automattic\WooCommerce\Admin\RemoteInboxNotifications as PromotionRuleEngine;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$current_section_name = __( 'Browse Categories', 'woocommerce' );
?>
<div class="woocommerce wc-addons-wrap">
	<h1 class="screen-reader-text"><?php esc_html_e( 'Marketplace', 'woocommerce' ); ?></h1>

	<?php if ( $sections ) : ?>
	<div class="marketplace-header">
		<h1 class="marketplace-header__title"><?php esc_html_e( 'WooCommerce Marketplace', 'woocommerce' ); ?></h1>
		<p class="marketplace-header__description"><?php esc_html_e( 'Grow your business with hundreds of free and paid WooCommerce extensions.', 'woocommerce' ); ?></p>
		<form class="marketplace-header__search-form" method="GET">
			<input
				type="text"
				name="search"
				value="<?php echo esc_attr( ! empty( $search ) ? sanitize_text_field( wp_unslash( $search ) ) : '' ); ?>"
				placeholder="<?php esc_attr_e( 'Search for extensions', 'woocommerce' ); ?>"
			/>
			<button type="submit">
				<span class="dashicons dashicons-search"></span>
			</button>
			<input type="hidden" name="page" value="wc-addons">
			<input type="hidden" name="section" value="_all">
		</form>
	</div>

	<div class="top-bar">
		<ul class="marketplace-header__tabs">
			<li class="marketplace-header__tab">
				<a
					class="marketplace-header__tab-link is-current"
					href="<?php echo esc_url( admin_url( 'admin.php?page=wc-addons' ) ); ?>"
				>
					<?php esc_html_e( 'Browse Extensions', 'woocommerce' ); ?>
				</a>
			</li>
			<li class="marketplace-header__tab">
				<a
					class="marketplace-header__tab-link marketplace-header__tab-link_helper"
					href="<?php echo esc_url( admin_url( 'admin.php?page=wc-addons&section=helper' ) ); ?>"
				>
					<?php
					$count_html = WC_Helper_Updater::get_updates_count_html();
					/* translators: %s: WooCommerce.com Subscriptions tab count HTML. */
					echo ( sprintf( __( 'My Subscriptions %s', 'woocommerce' ), $count_html ) );
					?>
				</a>
			</li>
		</ul>
	</div>

	<div class="wp-header-end"></div>

	<div class="wrap">
		<div class="marketplace-content-wrapper">
			<?php require __DIR__ . '/html-admin-page-addons-category-nav.php'; ?>
			<?php if ( ! empty( $search ) && ! is_wp_error( $addons ) && 0 === count( $addons ) ) : ?>
				<h1 class="search-form-title">
					<?php esc_html_e( 'Sorry, could not find anything. Try searching again using a different term.', 'woocommerce' ); ?></p>
				</h1>
			<?php endif; ?>
			<?php if ( ! empty( $search ) && ! is_wp_error( $addons ) && count( $addons ) > 0 ) : ?>
				<h1 class="search-form-title">
					<?php // translators: search keyword. ?>
					<?php printf( esc_html__( 'Search results for "%s"', 'woocommerce' ), esc_html( sanitize_text_field( wp_unslash( $search ) ) ) ); ?>
				</h1>
			<?php endif; ?>

			<?php if ( '_featured' === $current_section ) : ?>
				<div class="addons-featured">
					<?php WC_Admin_Addons::render_featured(); ?>
				</div>
			<?php endif; ?>
			<?php if ( '_featured' !== $current_section ) : ?>
				<?php if ( is_wp_error( $addons ) ) : ?>
					<?php WC_Admin_Addons::output_empty( $addons->get_error_message() ); ?>
				<?php else: ?>
					<?php
					if ( ! empty( $promotions ) && WC()->is_wc_admin_active() ) {
						foreach ( $promotions as $promotion ) {
							WC_Admin_Addons::output_search_promotion_block( $promotion );
						}
					}
					?>
					<ul class="products">
						<?php foreach ( $addons as $addon ) : ?>
							<?php
							if ( 'shipping_methods' === $current_section ) {
								// Do not show USPS or Canada Post extensions for US and CA stores, respectively.
								$country = WC()->countries->get_base_country();
								if ( 'US' === $country
									 && false !== strpos(
										$addon->link,
										'woocommerce.com/products/usps-shipping-method'
									)
								) {
									continue;
								}
								if ( 'CA' === $country
									 && false !== strpos(
										$addon->link,
										'woocommerce.com/products/canada-post-shipping-method'
									)
								) {
									continue;
								}
							}

							WC_Admin_Addons::render_product_card( $addon );
							?>
						<?php endforeach; ?>
					</ul>
				<?php endif; ?>
			<?php endif; ?>
		</div>
		<?php else : ?>
			<?php /* translators: a url */ ?>
			<p><?php printf( wp_kses_post( __( 'Our catalog of WooCommerce Extensions can be found on WooCommerce.com here: <a href="%s">WooCommerce Extensions Catalog</a>', 'woocommerce' ) ), 'https://woocommerce.com/product-category/woocommerce-extensions/' ); ?></p>
		<?php endif; ?>

		<?php if ( 'Storefront' !== $theme['Name'] && '_featured' !== $current_section ) : ?>
			<?php
				$storefront_url = WC_Admin_Addons::add_in_app_purchase_url_params( 'https://woocommerce.com/products/storefront/?utm_source=extensionsscreen&utm_medium=product&utm_campaign=wcaddon' );
			?>
			<div class="storefront">
				<h2><?php esc_html_e( 'Looking for a WooCommerce theme?', 'woocommerce' ); ?></h2>
				<p><?php echo wp_kses_post( __( 'We recommend Storefront, the <em>official</em> WooCommerce theme.', 'woocommerce' ) ); ?></p>
				<p><?php echo wp_kses_post( __( 'Storefront is an intuitive, flexible and <strong>free</strong> WordPress theme offering deep integration with WooCommerce and many of the most popular customer-facing extensions.', 'woocommerce' ) ); ?></p>
				<p>
					<a href="<?php echo esc_url( $storefront_url ); ?>" target="_blank" class="button"><?php esc_html_e( 'Read all about it', 'woocommerce' ); ?></a>
					<a href="<?php echo esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-theme&theme=storefront' ), 'install-theme_storefront' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Download &amp; install', 'woocommerce' ); ?></a>
				</p>
			</div>
		<?php endif; ?>
	</div>
</div>
html-admin-page-product-export.php000064400000007640151551052230013224 0ustar00<?php
/**
 * Admin View: Product Export
 *
 * @package WooCommerce\Admin\Export
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

wp_enqueue_script( 'wc-product-export' );

$exporter = new WC_Product_CSV_Exporter();
?>
<div class="wrap woocommerce">
	<h1><?php esc_html_e( 'Export Products', 'woocommerce' ); ?></h1>

	<div class="woocommerce-exporter-wrapper">
		<form class="woocommerce-exporter">
			<header>
				<span class="spinner is-active"></span>
				<h2><?php esc_html_e( 'Export products to a CSV file', 'woocommerce' ); ?></h2>
				<p><?php esc_html_e( 'This tool allows you to generate and download a CSV file containing a list of all products.', 'woocommerce' ); ?></p>
			</header>
			<section>
				<table class="form-table woocommerce-exporter-options">
					<tbody>
						<tr>
							<th scope="row">
								<label for="woocommerce-exporter-columns"><?php esc_html_e( 'Which columns should be exported?', 'woocommerce' ); ?></label>
							</th>
							<td>
								<select id="woocommerce-exporter-columns" class="woocommerce-exporter-columns wc-enhanced-select" style="width:100%;" multiple data-placeholder="<?php esc_attr_e( 'Export all columns', 'woocommerce' ); ?>">
									<?php
									foreach ( $exporter->get_default_column_names() as $column_id => $column_name ) {
										echo '<option value="' . esc_attr( $column_id ) . '">' . esc_html( $column_name ) . '</option>';
									}
									?>
									<option value="downloads"><?php esc_html_e( 'Downloads', 'woocommerce' ); ?></option>
									<option value="attributes"><?php esc_html_e( 'Attributes', 'woocommerce' ); ?></option>
								</select>
							</td>
						</tr>
						<tr>
							<th scope="row">
								<label for="woocommerce-exporter-types"><?php esc_html_e( 'Which product types should be exported?', 'woocommerce' ); ?></label>
							</th>
							<td>
								<select id="woocommerce-exporter-types" class="woocommerce-exporter-types wc-enhanced-select" style="width:100%;" multiple data-placeholder="<?php esc_attr_e( 'Export all products', 'woocommerce' ); ?>">
									<?php
									foreach ( WC_Admin_Exporters::get_product_types() as $value => $label ) {
										echo '<option value="' . esc_attr( $value ) . '">' . esc_html( $label ) . '</option>';
									}
									?>
								</select>
							</td>
						</tr>
						<tr>
							<th scope="row">
								<label for="woocommerce-exporter-category"><?php esc_html_e( 'Which product category should be exported?', 'woocommerce' ); ?></label>
							</th>
							<td>
								<select id="woocommerce-exporter-category" class="woocommerce-exporter-category wc-enhanced-select" style="width:100%;" multiple data-placeholder="<?php esc_attr_e( 'Export all categories', 'woocommerce' ); ?>">
								<?php
								$categories = get_categories(
									array(
										'taxonomy'   => 'product_cat',
										'hide_empty' => false,
									)
								);
								foreach ( $categories as $category ) {
									echo '<option value="' . esc_attr( $category->slug ) . '">' . esc_html( $category->name ) . '</option>';
								}
								?>
								</select>
							</td>
						</tr>
						<tr>
							<th scope="row">
								<label for="woocommerce-exporter-meta"><?php esc_html_e( 'Export custom meta?', 'woocommerce' ); ?></label>
							</th>
							<td>
								<input type="checkbox" id="woocommerce-exporter-meta" value="1" />
								<label for="woocommerce-exporter-meta"><?php esc_html_e( 'Yes, export all custom meta', 'woocommerce' ); ?></label>
							</td>
						</tr>
						<?php do_action( 'woocommerce_product_export_row' ); ?>
					</tbody>
				</table>
				<progress class="woocommerce-exporter-progress" max="100" value="0"></progress>
			</section>
			<div class="wc-actions">
				<button type="submit" class="woocommerce-exporter-button button button-primary" value="<?php esc_attr_e( 'Generate CSV', 'woocommerce' ); ?>"><?php esc_html_e( 'Generate CSV', 'woocommerce' ); ?></button>
			</div>
		</form>
	</div>
</div>
html-admin-page-reports.php000064400000004622151551052230011720 0ustar00<?php
/**
 * Admin View: Page - Reports
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

?>
<div class="wrap woocommerce">
	<?php if ( WC()->is_wc_admin_active() ) { ?>
	<div id="message" class="error inline" style="margin-top:30px">
		<p>
			<strong>
			<?php
			/* translators: 1: Link URL */
			echo wp_kses_post( sprintf( __( 'With the release of WooCommerce 4.0, these reports are being replaced. There is a new and better Analytics section available for users running WordPress 5.3+. Head on over to the <a href="%1$s">WooCommerce Analytics</a> or learn more about the new experience in the <a href="https://docs.woocommerce.com/document/woocommerce-analytics/" target="_blank">WooCommerce Analytics documentation</a>.', 'woocommerce' ), esc_url( wc_admin_url( '&path=/analytics/overview' ) ) ) );
			?>
			</strong>
		</p>
	</div>
	<?php } ?>
	<nav class="nav-tab-wrapper woo-nav-tab-wrapper">
		<?php
		foreach ( $reports as $key => $report_group ) {
			echo '<a href="' . admin_url( 'admin.php?page=wc-reports&tab=' . urlencode( $key ) ) . '" class="nav-tab ';
			if ( $current_tab == $key ) {
				echo 'nav-tab-active';
			}
			echo '">' . esc_html( $report_group['title'] ) . '</a>';
		}

		do_action( 'wc_reports_tabs' );
		?>
	</nav>
	<?php
	if ( count( $reports[ $current_tab ]['reports'] ) > 1 ) {
		?>
		<ul class="subsubsub">
			<li>
			<?php

			$links = array();

			foreach ( $reports[ $current_tab ]['reports'] as $key => $report ) {
				$link = '<a href="admin.php?page=wc-reports&tab=' . urlencode( $current_tab ) . '&amp;report=' . urlencode( $key ) . '" class="';

				if ( $key == $current_report ) {
					$link .= 'current';
				}

				$link .= '">' . $report['title'] . '</a>';

				$links[] = $link;
			}

			echo implode( ' | </li><li>', $links );

			?>
			</li>
		</ul>
		<br class="clear" />
		<?php
	}

	if ( isset( $reports[ $current_tab ]['reports'][ $current_report ] ) ) {
		$report = $reports[ $current_tab ]['reports'][ $current_report ];

		if ( ! isset( $report['hide_title'] ) || true != $report['hide_title'] ) {
			echo '<h1>' . esc_html( $report['title'] ) . '</h1>';
		} else {
			echo '<h1 class="screen-reader-text">' . esc_html( $report['title'] ) . '</h1>';
		}

		if ( $report['description'] ) {
			echo '<p>' . $report['description'] . '</p>';
		}

		if ( $report['callback'] && ( is_callable( $report['callback'] ) ) ) {
			call_user_func( $report['callback'], $current_report );
		}
	}
	?>
</div>
html-admin-page-status-logs-db.php000064400000001456151551052230013074 0ustar00<?php
/**
 * Admin View: Page - Status Database Logs
 *
 * @package WooCommerce\Admin\Logs
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

?>
<form method="post" id="mainform" action="">
	<?php $log_table_list->search_box( __( 'Search logs', 'woocommerce' ), 'log' ); ?>
	<?php $log_table_list->display(); ?>

	<input type="hidden" name="page" value="wc-status" />
	<input type="hidden" name="tab" value="logs" />

	<?php submit_button( __( 'Flush all logs', 'woocommerce' ), 'delete', 'flush-logs' ); ?>
	<?php wp_nonce_field( 'woocommerce-status-logs' ); ?>
</form>
<?php
wc_enqueue_js(
	"jQuery( '#flush-logs' ).on( 'click', function() {
		if ( window.confirm('" . esc_js( __( 'Are you sure you want to clear all logs from the database?', 'woocommerce' ) ) . "') ) {
			return true;
		}
		return false;
	});"
);
html-admin-page-status-logs.php000064400000003746151551052230012515 0ustar00<?php
/**
 * Admin View: Page - Status Logs
 *
 * @package WooCommerce\Admin\Logs
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

?>
<?php if ( $logs ) : ?>
	<div id="log-viewer-select">
		<div class="alignleft">
			<h2>
				<?php echo esc_html( $viewed_log ); ?>
				<?php if ( ! empty( $viewed_log ) ) : ?>
					<a class="page-title-action" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'handle' => sanitize_title( $viewed_log ) ), admin_url( 'admin.php?page=wc-status&tab=logs' ) ), 'remove_log' ) ); ?>" class="button"><?php esc_html_e( 'Delete log', 'woocommerce' ); ?></a>
				<?php endif; ?>
			</h2>
		</div>
		<div class="alignright">
			<form action="<?php echo esc_url( admin_url( 'admin.php?page=wc-status&tab=logs' ) ); ?>" method="post">
				<select class="wc-enhanced-select" name="log_file">
					<?php foreach ( $logs as $log_key => $log_file ) : ?>
						<?php
							$timestamp = filemtime( WC_LOG_DIR . $log_file );
							$date      = sprintf(
								/* translators: 1: last access date 2: last access time 3: last access timezone abbreviation */
								__( '%1$s at %2$s %3$s', 'woocommerce' ),
								wp_date( wc_date_format(), $timestamp ),
								wp_date( wc_time_format(), $timestamp ),
								wp_date( 'T', $timestamp )
							);
						?>
						<option value="<?php echo esc_attr( $log_key ); ?>" <?php selected( sanitize_title( $viewed_log ), $log_key ); ?>><?php echo esc_html( $log_file ); ?> (<?php echo esc_html( $date ); ?>)</option>
					<?php endforeach; ?>
				</select>
				<button type="submit" class="button" value="<?php esc_attr_e( 'View', 'woocommerce' ); ?>"><?php esc_html_e( 'View', 'woocommerce' ); ?></button>
			</form>
		</div>
		<div class="clear"></div>
	</div>
	<div id="log-viewer">
		<pre><?php echo esc_html( file_get_contents( WC_LOG_DIR . $viewed_log ) ); ?></pre>
	</div>
<?php else : ?>
	<div class="updated woocommerce-message inline"><p><?php esc_html_e( 'There are currently no logs to view.', 'woocommerce' ); ?></p></div>
<?php endif; ?>
html-admin-page-status-report.php000064400000150114151551052230013054 0ustar00<?php
/**
 * Admin View: Page - Status Report.
 *
 * @package WooCommerce
 */

use Automattic\Jetpack\Constants;

defined( 'ABSPATH' ) || exit;

global $wpdb;

$report             = wc()->api->get_endpoint_data( '/wc/v3/system_status' );
$environment        = $report['environment'];
$database           = $report['database'];
$post_type_counts   = isset( $report['post_type_counts'] ) ? $report['post_type_counts'] : array();
$active_plugins     = $report['active_plugins'];
$inactive_plugins   = $report['inactive_plugins'];
$dropins_mu_plugins = $report['dropins_mu_plugins'];
$theme              = $report['theme'];
$security           = $report['security'];
$settings           = $report['settings'];
$wp_pages           = $report['pages'];
$plugin_updates     = new WC_Plugin_Updates();
$untested_plugins   = $plugin_updates->get_untested_plugins( WC()->version, Constants::get_constant( 'WC_SSR_PLUGIN_UPDATE_RELEASE_VERSION_TYPE' ) );
?>
<div class="updated woocommerce-message inline">
	<p>
		<?php esc_html_e( 'Please copy and paste this information in your ticket when contacting support:', 'woocommerce' ); ?>
	</p>
	<p class="submit">
		<a href="#" class="button-primary debug-report"><?php esc_html_e( 'Get system report', 'woocommerce' ); ?></a>
		<a class="button-secondary docs" href="https://docs.woocommerce.com/document/understanding-the-woocommerce-system-status-report/" target="_blank">
			<?php esc_html_e( 'Understanding the status report', 'woocommerce' ); ?>
		</a>
	</p>
	<div id="debug-report">
		<textarea readonly="readonly"></textarea>
		<p class="submit">
			<button id="download-for-support" class="button-primary" href="#">
				<?php esc_html_e( 'Download for support', 'woocommerce' ); ?>
			</button>
			<button id="copy-for-support" class="button" href="#" data-tip="<?php esc_attr_e( 'Copied!', 'woocommerce' ); ?>">
				<?php esc_html_e( 'Copy for support', 'woocommerce' ); ?>
			</button>
		</p>
		<p class="copy-error hidden">
			<?php esc_html_e( 'Copying to clipboard failed. Please press Ctrl/Cmd+C to copy.', 'woocommerce' ); ?>
		</p>
	</div>
</div>
<table class="wc_status_table widefat" cellspacing="0" id="status">
	<thead>
		<tr>
			<th colspan="3" data-export-label="WordPress Environment"><h2><?php esc_html_e( 'WordPress environment', 'woocommerce' ); ?></h2></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td data-export-label="WordPress address (URL)"><?php esc_html_e( 'WordPress address (URL)', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The root URL of your site.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $environment['site_url'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="Site address (URL)"><?php esc_html_e( 'Site address (URL)', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The homepage URL of your site.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $environment['home_url'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="WC Version"><?php esc_html_e( 'WooCommerce version', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The version of WooCommerce installed on your site.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $environment['version'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="REST API Version"><?php esc_html_e( 'WooCommerce REST API package', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The WooCommerce REST API package running on your site.', 'woocommerce' ) ); ?></td>
			<td>
				<?php
				$version = wc()->api->get_rest_api_package_version();

				if ( ! is_null( $version ) ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span> ' . esc_html( $version ) . ' <code class="private">' . esc_html( wc()->api->get_rest_api_package_path() ) . '</code></mark> ';
				} else {
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Unable to detect the REST API package.', 'woocommerce' ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="WC Blocks Version"><?php esc_html_e( 'WooCommerce Blocks package', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The WooCommerce Blocks package running on your site.', 'woocommerce' ) ); ?></td>
			<td>
				<?php
				if ( class_exists( '\Automattic\WooCommerce\Blocks\Package' ) ) {
					$version = \Automattic\WooCommerce\Blocks\Package::get_version();
					$path    = \Automattic\WooCommerce\Blocks\Package::get_path(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
				} else {
					$version = null;
				}

				if ( ! is_null( $version ) ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span> ' . esc_html( $version ) . ' <code class="private">' . esc_html( $path ) . '</code></mark> ';
				} else {
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Unable to detect the Blocks package.', 'woocommerce' ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="Action Scheduler Version"><?php esc_html_e( 'Action Scheduler package', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Action Scheduler package running on your site.', 'woocommerce' ) ); ?></td>
			<td>
				<?php
				if ( class_exists( 'ActionScheduler_Versions' ) && class_exists( 'ActionScheduler' ) ) {
					$version = ActionScheduler_Versions::instance()->latest_version();
					$path    = ActionScheduler::plugin_path( '' ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
				} else {
					$version = null;
				}

				if ( ! is_null( $version ) ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span> ' . esc_html( $version ) . ' <code class="private">' . esc_html( $path ) . '</code></mark> ';
				} else {
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Unable to detect the Action Scheduler package.', 'woocommerce' ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="Log Directory Writable"><?php esc_html_e( 'Log directory writable', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Several WooCommerce extensions can write logs which makes debugging problems easier. The directory must be writable for this to happen.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( $environment['log_directory_writable'] ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span> <code class="private">' . esc_html( $environment['log_directory'] ) . '</code></mark> ';
				} else {
					/* Translators: %1$s: Log directory, %2$s: Log directory constant */
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( 'To allow logging, make %1$s writable or define a custom %2$s.', 'woocommerce' ), '<code>' . esc_html( $environment['log_directory'] ) . '</code>', '<code>WC_LOG_DIR</code>' ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="WP Version"><?php esc_html_e( 'WordPress version', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The version of WordPress installed on your site.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				$latest_version = get_transient( 'woocommerce_system_status_wp_version_check' );

				if ( false === $latest_version ) {
					$version_check = wp_remote_get( 'https://api.wordpress.org/core/version-check/1.7/' );
					$api_response  = json_decode( wp_remote_retrieve_body( $version_check ), true );

					if ( $api_response && isset( $api_response['offers'], $api_response['offers'][0], $api_response['offers'][0]['version'] ) ) {
						$latest_version = $api_response['offers'][0]['version'];
					} else {
						$latest_version = $environment['wp_version'];
					}
					set_transient( 'woocommerce_system_status_wp_version_check', $latest_version, DAY_IN_SECONDS );
				}

				if ( version_compare( $environment['wp_version'], $latest_version, '<' ) ) {
					/* Translators: %1$s: Current version, %2$s: New version */
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%1$s - There is a newer version of WordPress available (%2$s)', 'woocommerce' ), esc_html( $environment['wp_version'] ), esc_html( $latest_version ) ) . '</mark>';
				} else {
					echo '<mark class="yes">' . esc_html( $environment['wp_version'] ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="WP Multisite"><?php esc_html_e( 'WordPress multisite', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Whether or not you have WordPress Multisite enabled.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo ( $environment['wp_multisite'] ) ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
		</tr>
		<tr>
			<td data-export-label="WP Memory Limit"><?php esc_html_e( 'WordPress memory limit', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The maximum amount of memory (RAM) that your site can use at one time.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( $environment['wp_memory_limit'] < 67108864 ) {
					/* Translators: %1$s: Memory limit, %2$s: Docs link. */
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%1$s - We recommend setting memory to at least 64MB. See: %2$s', 'woocommerce' ), esc_html( size_format( $environment['wp_memory_limit'] ) ), '<a href="https://wordpress.org/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php" target="_blank">' . esc_html__( 'Increasing memory allocated to PHP', 'woocommerce' ) . '</a>' ) . '</mark>';
				} else {
					echo '<mark class="yes">' . esc_html( size_format( $environment['wp_memory_limit'] ) ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="WP Debug Mode"><?php esc_html_e( 'WordPress debug mode', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Displays whether or not WordPress is in Debug Mode.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php if ( $environment['wp_debug_mode'] ) : ?>
					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
				<?php else : ?>
					<mark class="no">&ndash;</mark>
				<?php endif; ?>
			</td>
		</tr>
		<tr>
			<td data-export-label="WP Cron"><?php esc_html_e( 'WordPress cron', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Displays whether or not WP Cron Jobs are enabled.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php if ( $environment['wp_cron'] ) : ?>
					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
				<?php else : ?>
					<mark class="no">&ndash;</mark>
				<?php endif; ?>
			</td>
		</tr>
		<tr>
			<td data-export-label="Language"><?php esc_html_e( 'Language', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The current language used by WordPress. Default = English', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $environment['language'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="External object cache"><?php esc_html_e( 'External object cache', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Displays whether or not WordPress is using an external object cache.', 'woocommerce' ) ); ?></td>
			<td>
				<?php if ( $environment['external_object_cache'] ) : ?>
					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
				<?php else : ?>
					<mark class="no">&ndash;</mark>
				<?php endif; ?>
			</td>
		</tr>
	</tbody>
</table>
<table class="wc_status_table widefat" cellspacing="0">
	<thead>
		<tr>
			<th colspan="3" data-export-label="Server Environment"><h2><?php esc_html_e( 'Server environment', 'woocommerce' ); ?></h2></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td data-export-label="Server Info"><?php esc_html_e( 'Server info', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Information about the web server that is currently hosting your site.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $environment['server_info'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="PHP Version"><?php esc_html_e( 'PHP version', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The version of PHP installed on your hosting server.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php echo '<mark class="yes">' . esc_html( $environment['php_version'] ) . '</mark>'; ?>
			</td>
		</tr>
		<?php if ( function_exists( 'ini_get' ) ) : ?>
			<tr>
				<td data-export-label="PHP Post Max Size"><?php esc_html_e( 'PHP post max size', 'woocommerce' ); ?>:</td>
				<td class="help"><?php echo wc_help_tip( esc_html__( 'The largest filesize that can be contained in one post.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
				<td><?php echo esc_html( size_format( $environment['php_post_max_size'] ) ); ?></td>
			</tr>
			<tr>
				<td data-export-label="PHP Time Limit"><?php esc_html_e( 'PHP time limit', 'woocommerce' ); ?>:</td>
				<td class="help"><?php echo wc_help_tip( esc_html__( 'The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups)', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
				<td><?php echo esc_html( $environment['php_max_execution_time'] ); ?></td>
			</tr>
			<tr>
				<td data-export-label="PHP Max Input Vars"><?php esc_html_e( 'PHP max input vars', 'woocommerce' ); ?>:</td>
				<td class="help"><?php echo wc_help_tip( esc_html__( 'The maximum number of variables your server can use for a single function to avoid overloads.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
				<td><?php echo esc_html( $environment['php_max_input_vars'] ); ?></td>
			</tr>
			<tr>
				<td data-export-label="cURL Version"><?php esc_html_e( 'cURL version', 'woocommerce' ); ?>:</td>
				<td class="help"><?php echo wc_help_tip( esc_html__( 'The version of cURL installed on your server.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
				<td><?php echo esc_html( $environment['curl_version'] ); ?></td>
			</tr>
			<tr>
				<td data-export-label="SUHOSIN Installed"><?php esc_html_e( 'SUHOSIN installed', 'woocommerce' ); ?>:</td>
				<td class="help"><?php echo wc_help_tip( esc_html__( 'Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
				<td><?php echo $environment['suhosin_installed'] ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
			</tr>
		<?php endif; ?>

		<?php

		if ( $environment['mysql_version'] ) :
			?>
			<tr>
				<td data-export-label="MySQL Version"><?php esc_html_e( 'MySQL version', 'woocommerce' ); ?>:</td>
				<td class="help"><?php echo wc_help_tip( esc_html__( 'The version of MySQL installed on your hosting server.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
				<td>
					<?php
					if ( version_compare( $environment['mysql_version'], '5.6', '<' ) && ! strstr( $environment['mysql_version_string'], 'MariaDB' ) ) {
						/* Translators: %1$s: MySQL version, %2$s: Recommended MySQL version. */
						echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%1$s - We recommend a minimum MySQL version of 5.6. See: %2$s', 'woocommerce' ), esc_html( $environment['mysql_version_string'] ), '<a href="https://wordpress.org/about/requirements/" target="_blank">' . esc_html__( 'WordPress requirements', 'woocommerce' ) . '</a>' ) . '</mark>';
					} else {
						echo '<mark class="yes">' . esc_html( $environment['mysql_version_string'] ) . '</mark>';
					}
					?>
				</td>
			</tr>
		<?php endif; ?>
		<tr>
			<td data-export-label="Max Upload Size"><?php esc_html_e( 'Max upload size', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The largest filesize that can be uploaded to your WordPress installation.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( size_format( $environment['max_upload_size'] ) ); ?></td>
		</tr>
		<tr>
			<td data-export-label="Default Timezone is UTC"><?php esc_html_e( 'Default timezone is UTC', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The default timezone for your server.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( 'UTC' !== $environment['default_timezone'] ) {
					/* Translators: %s: default timezone.. */
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( 'Default timezone is %s - it should be UTC', 'woocommerce' ), esc_html( $environment['default_timezone'] ) ) . '</mark>';
				} else {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="fsockopen/cURL"><?php esc_html_e( 'fsockopen/cURL', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Payment gateways can use cURL to communicate with remote servers to authorize payments, other plugins may also use it when communicating with remote services.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( $environment['fsockopen_or_curl_enabled'] ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
				} else {
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'woocommerce' ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="SoapClient"><?php esc_html_e( 'SoapClient', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Some webservices like shipping use SOAP to get information from remote servers, for example, live shipping quotes from FedEx require SOAP to be installed.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( $environment['soapclient_enabled'] ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
				} else {
					/* Translators: %s classname and link. */
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( 'Your server does not have the %s class enabled - some gateway plugins which use SOAP may not work as expected.', 'woocommerce' ), '<a href="https://php.net/manual/en/class.soapclient.php">SoapClient</a>' ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="DOMDocument"><?php esc_html_e( 'DOMDocument', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( $environment['domdocument_enabled'] ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
				} else {
					/* Translators: %s: classname and link. */
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( 'Your server does not have the %s class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument.', 'woocommerce' ), '<a href="https://php.net/manual/en/class.domdocument.php">DOMDocument</a>' ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="GZip"><?php esc_html_e( 'GZip', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'GZip (gzopen) is used to open the GEOIP database from MaxMind.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( $environment['gzip_enabled'] ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
				} else {
					/* Translators: %s: classname and link. */
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( 'Your server does not support the %s function - this is required to use the GeoIP database from MaxMind.', 'woocommerce' ), '<a href="https://php.net/manual/en/zlib.installation.php">gzopen</a>' ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="Multibyte String"><?php esc_html_e( 'Multibyte string', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( $environment['mbstring_enabled'] ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
				} else {
					/* Translators: %s: classname and link. */
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( 'Your server does not support the %s functions - this is required for better character encoding. Some fallbacks will be used instead for it.', 'woocommerce' ), '<a href="https://php.net/manual/en/mbstring.installation.php">mbstring</a>' ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="Remote Post"><?php esc_html_e( 'Remote post', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'PayPal uses this method of communicating when sending back transaction information.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( $environment['remote_post_successful'] ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
				} else {
					/* Translators: %s: function name. */
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%s failed. Contact your hosting provider.', 'woocommerce' ), 'wp_remote_post()' ) . ' ' . esc_html( $environment['remote_post_response'] ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="Remote Get"><?php esc_html_e( 'Remote get', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'WooCommerce plugins may use this method of communication when checking for plugin updates.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( $environment['remote_get_successful'] ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
				} else {
					/* Translators: %s: function name. */
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%s failed. Contact your hosting provider.', 'woocommerce' ), 'wp_remote_get()' ) . ' ' . esc_html( $environment['remote_get_response'] ) . '</mark>';
				}
				?>
			</td>
		</tr>
		<?php
		$rows = apply_filters( 'woocommerce_system_status_environment_rows', array() );
		foreach ( $rows as $row ) {
			if ( ! empty( $row['success'] ) ) {
				$css_class = 'yes';
				$icon      = '<span class="dashicons dashicons-yes"></span>';
			} else {
				$css_class = 'error';
				$icon      = '<span class="dashicons dashicons-no-alt"></span>';
			}
			?>
			<tr>
				<td data-export-label="<?php echo esc_attr( $row['name'] ); ?>"><?php echo esc_html( $row['name'] ); ?>:</td>
				<td class="help"><?php echo esc_html( isset( $row['help'] ) ? $row['help'] : '' ); ?></td>
				<td>
					<mark class="<?php echo esc_attr( $css_class ); ?>">
						<?php echo wp_kses_post( $icon ); ?> <?php echo wp_kses_data( ! empty( $row['note'] ) ? $row['note'] : '' ); ?>
					</mark>
				</td>
			</tr>
			<?php
		}
		?>
	</tbody>
</table>
<table id="status-database" class="wc_status_table widefat" cellspacing="0">
	<thead>
	<tr>
		<th colspan="3" data-export-label="Database">
			<h2>
				<?php
					esc_html_e( 'Database', 'woocommerce' );
					self::output_tables_info();
				?>
			</h2>
		</th>
	</tr>
	</thead>
	<tbody>
		<tr>
			<td data-export-label="WC Database Version"><?php esc_html_e( 'WooCommerce database version', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The database version for WooCommerce. This should be the same as your WooCommerce version.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $database['wc_database_version'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="WC Database Prefix"><?php esc_html_e( 'Database prefix', 'woocommerce' ); ?></td>
			<td class="help">&nbsp;</td>
			<td>
				<?php
				if ( strlen( $database['database_prefix'] ) > 20 ) {
					/* Translators: %1$s: Database prefix, %2$s: Docs link. */
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( esc_html__( '%1$s - We recommend using a prefix with less than 20 characters. See: %2$s', 'woocommerce' ), esc_html( $database['database_prefix'] ), '<a href="https://docs.woocommerce.com/document/completed-order-email-doesnt-contain-download-links/#section-2" target="_blank">' . esc_html__( 'How to update your database table prefix', 'woocommerce' ) . '</a>' ) . '</mark>';
				} else {
					echo '<mark class="yes">' . esc_html( $database['database_prefix'] ) . '</mark>';
				}
				?>
			</td>
		</tr>

		<?php if ( ! empty( $database['database_size'] ) && ! empty( $database['database_tables'] ) ) : ?>
			<tr>
				<td><?php esc_html_e( 'Total Database Size', 'woocommerce' ); ?></td>
				<td class="help">&nbsp;</td>
				<td><?php printf( '%.2fMB', esc_html( $database['database_size']['data'] + $database['database_size']['index'] ) ); ?></td>
			</tr>

			<tr>
				<td><?php esc_html_e( 'Database Data Size', 'woocommerce' ); ?></td>
				<td class="help">&nbsp;</td>
				<td><?php printf( '%.2fMB', esc_html( $database['database_size']['data'] ) ); ?></td>
			</tr>

			<tr>
				<td><?php esc_html_e( 'Database Index Size', 'woocommerce' ); ?></td>
				<td class="help">&nbsp;</td>
				<td><?php printf( '%.2fMB', esc_html( $database['database_size']['index'] ) ); ?></td>
			</tr>

			<?php foreach ( $database['database_tables']['woocommerce'] as $table => $table_data ) { ?>
				<tr>
					<td><?php echo esc_html( $table ); ?></td>
					<td class="help">&nbsp;</td>
					<td>
						<?php
						if ( ! $table_data ) {
							echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Table does not exist', 'woocommerce' ) . '</mark>';
						} else {
							/* Translators: %1$f: Table size, %2$f: Index size, %3$s Engine. */
							printf( esc_html__( 'Data: %1$.2fMB + Index: %2$.2fMB + Engine %3$s', 'woocommerce' ), esc_html( wc_format_decimal( $table_data['data'], 2 ) ), esc_html( wc_format_decimal( $table_data['index'], 2 ) ), esc_html( $table_data['engine'] ) );
						}
						?>
					</td>
				</tr>
			<?php } ?>

			<?php foreach ( $database['database_tables']['other'] as $table => $table_data ) { ?>
				<tr>
					<td><?php echo esc_html( $table ); ?></td>
					<td class="help">&nbsp;</td>
					<td>
						<?php
							/* Translators: %1$f: Table size, %2$f: Index size, %3$s Engine. */
							printf( esc_html__( 'Data: %1$.2fMB + Index: %2$.2fMB + Engine %3$s', 'woocommerce' ), esc_html( wc_format_decimal( $table_data['data'], 2 ) ), esc_html( wc_format_decimal( $table_data['index'], 2 ) ), esc_html( $table_data['engine'] ) );
						?>
					</td>
				</tr>
			<?php } ?>
		<?php else : ?>
			<tr>
				<td><?php esc_html_e( 'Database information:', 'woocommerce' ); ?></td>
				<td class="help">&nbsp;</td>
				<td>
					<?php
					esc_html_e(
						'Unable to retrieve database information. Usually, this is not a problem, and it only means that your install is using a class that replaces the WordPress database class (e.g., HyperDB) and WooCommerce is unable to get database information.',
						'woocommerce'
					);
					?>
				</td>
			</tr>
		<?php endif; ?>
	</tbody>
</table>
<?php if ( $post_type_counts ) : ?>
	<table class="wc_status_table widefat" cellspacing="0">
		<thead>
		<tr>
			<th colspan="3" data-export-label="Post Type Counts"><h2><?php esc_html_e( 'Post Type Counts', 'woocommerce' ); ?></h2></th>
		</tr>
		</thead>
		<tbody>
			<?php
			foreach ( $post_type_counts as $ptype ) {
				?>
				<tr>
					<td><?php echo esc_html( $ptype['type'] ); ?></td>
					<td class="help">&nbsp;</td>
					<td><?php echo absint( $ptype['count'] ); ?></td>
				</tr>
				<?php
			}
			?>
		</tbody>
	</table>
<?php endif; ?>
<table class="wc_status_table widefat" cellspacing="0">
	<thead>
		<tr>
			<th colspan="3" data-export-label="Security"><h2><?php esc_html_e( 'Security', 'woocommerce' ); ?></h2></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td data-export-label="Secure connection (HTTPS)"><?php esc_html_e( 'Secure connection (HTTPS)', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Is the connection to your store secure?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php if ( $security['secure_connection'] ) : ?>
					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
				<?php else : ?>
					<mark class="error"><span class="dashicons dashicons-warning"></span>
					<?php
					/* Translators: %s: docs link. */
					echo wp_kses_post( sprintf( __( 'Your store is not using HTTPS. <a href="%s" target="_blank">Learn more about HTTPS and SSL Certificates</a>.', 'woocommerce' ), 'https://docs.woocommerce.com/document/ssl-and-https/' ) );
					?>
					</mark>
				<?php endif; ?>
			</td>
		</tr>
		<tr>
			<td data-export-label="Hide errors from visitors"><?php esc_html_e( 'Hide errors from visitors', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Error messages can contain sensitive information about your store environment. These should be hidden from untrusted visitors.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php if ( $security['hide_errors'] ) : ?>
					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
				<?php else : ?>
					<mark class="error"><span class="dashicons dashicons-warning"></span><?php esc_html_e( 'Error messages should not be shown to visitors.', 'woocommerce' ); ?></mark>
				<?php endif; ?>
			</td>
		</tr>
	</tbody>
</table>
<table class="wc_status_table widefat" cellspacing="0">
	<thead>
		<tr>
			<th colspan="3" data-export-label="Active Plugins (<?php echo count( $active_plugins ); ?>)"><h2><?php esc_html_e( 'Active plugins', 'woocommerce' ); ?> (<?php echo count( $active_plugins ); ?>)</h2></th>
		</tr>
	</thead>
	<tbody>
		<?php self::output_plugins_info( $active_plugins, $untested_plugins ); ?>
	</tbody>
</table>
<table class="wc_status_table widefat" cellspacing="0">
	<thead>
		<tr>
			<th colspan="3" data-export-label="Inactive Plugins (<?php echo count( $inactive_plugins ); ?>)"><h2><?php esc_html_e( 'Inactive plugins', 'woocommerce' ); ?> (<?php echo count( $inactive_plugins ); ?>)</h2></th>
		</tr>
	</thead>
	<tbody>
		<?php self::output_plugins_info( $inactive_plugins, $untested_plugins ); ?>
	</tbody>
</table>
<?php
if ( 0 < count( $dropins_mu_plugins['dropins'] ) ) :
	?>
	<table class="wc_status_table widefat" cellspacing="0">
		<thead>
			<tr>
				<th colspan="3" data-export-label="Dropin Plugins (<?php echo count( $dropins_mu_plugins['dropins'] ); ?>)"><h2><?php esc_html_e( 'Dropin Plugins', 'woocommerce' ); ?> (<?php echo count( $dropins_mu_plugins['dropins'] ); ?>)</h2></th>
			</tr>
		</thead>
		<tbody>
			<?php
			foreach ( $dropins_mu_plugins['dropins'] as $dropin ) {
				?>
				<tr>
					<td><?php echo wp_kses_post( $dropin['plugin'] ); ?></td>
					<td class="help">&nbsp;</td>
					<td><?php echo wp_kses_post( $dropin['name'] ); ?>
				</tr>
				<?php
			}
			?>
		</tbody>
	</table>
	<?php
endif;
if ( 0 < count( $dropins_mu_plugins['mu_plugins'] ) ) :
	?>
	<table class="wc_status_table widefat" cellspacing="0">
		<thead>
			<tr>
				<th colspan="3" data-export-label="Must Use Plugins (<?php echo count( $dropins_mu_plugins['mu_plugins'] ); ?>)"><h2><?php esc_html_e( 'Must Use Plugins', 'woocommerce' ); ?> (<?php echo count( $dropins_mu_plugins['mu_plugins'] ); ?>)</h2></th>
			</tr>
		</thead>
		<tbody>
			<?php
			foreach ( $dropins_mu_plugins['mu_plugins'] as $mu_plugin ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
				$plugin_name = esc_html( $mu_plugin['name'] );
				if ( ! empty( $mu_plugin['url'] ) ) {
					$plugin_name = '<a href="' . esc_url( $mu_plugin['url'] ) . '" aria-label="' . esc_attr__( 'Visit plugin homepage', 'woocommerce' ) . '" target="_blank">' . $plugin_name . '</a>';
				}
				?>
				<tr>
					<td><?php echo wp_kses_post( $plugin_name ); ?></td>
					<td class="help">&nbsp;</td>
					<td>
					<?php
						/* translators: %s: plugin author */
						printf( esc_html__( 'by %s', 'woocommerce' ), esc_html( $mu_plugin['author_name'] ) );
						echo ' &ndash; ' . esc_html( $mu_plugin['version'] );
					?>
				</tr>
				<?php
			}
			?>
		</tbody>
	</table>
<?php endif; ?>
<table class="wc_status_table widefat" cellspacing="0">
	<thead>
		<tr>
			<th colspan="3" data-export-label="Settings"><h2><?php esc_html_e( 'Settings', 'woocommerce' ); ?></h2></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td data-export-label="API Enabled"><?php esc_html_e( 'API enabled', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Does your site have REST API enabled?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo $settings['api_enabled'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
		</tr>
		<tr>
			<td data-export-label="Force SSL"><?php esc_html_e( 'Force SSL', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Does your site force a SSL Certificate for transactions?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo $settings['force_ssl'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
		</tr>
		<tr>
			<td data-export-label="Currency"><?php esc_html_e( 'Currency', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'What currency prices are listed at in the catalog and which currency gateways will take payments in.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $settings['currency'] ); ?> (<?php echo esc_html( $settings['currency_symbol'] ); ?>)</td>
		</tr>
		<tr>
			<td data-export-label="Currency Position"><?php esc_html_e( 'Currency position', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The position of the currency symbol.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $settings['currency_position'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="Thousand Separator"><?php esc_html_e( 'Thousand separator', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The thousand separator of displayed prices.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $settings['thousand_separator'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="Decimal Separator"><?php esc_html_e( 'Decimal separator', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The decimal separator of displayed prices.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $settings['decimal_separator'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="Number of Decimals"><?php esc_html_e( 'Number of decimals', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The number of decimal points shown in displayed prices.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $settings['number_of_decimals'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="Taxonomies: Product Types"><?php esc_html_e( 'Taxonomies: Product types', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'A list of taxonomy terms that can be used in regard to order/product statuses.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				$display_terms = array();
				foreach ( $settings['taxonomies'] as $slug => $name ) {
					$display_terms[] = strtolower( $name ) . ' (' . $slug . ')';
				}
				echo implode( ', ', array_map( 'esc_html', $display_terms ) );
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="Taxonomies: Product Visibility"><?php esc_html_e( 'Taxonomies: Product visibility', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'A list of taxonomy terms used for product visibility.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				$display_terms = array();
				foreach ( $settings['product_visibility_terms'] as $slug => $name ) {
					$display_terms[] = strtolower( $name ) . ' (' . $slug . ')';
				}
				echo implode( ', ', array_map( 'esc_html', $display_terms ) );
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="Connected to WooCommerce.com"><?php esc_html_e( 'Connected to WooCommerce.com', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Is your site connected to WooCommerce.com?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo 'yes' === $settings['woocommerce_com_connected'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
		</tr>
		<tr>
			<td data-export-label="Enforce Approved Product Download Directories"><?php esc_html_e( 'Enforce Approved Product Download Directories', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Is your site enforcing the use of Approved Product Download Directories?', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo $settings['enforce_approved_download_dirs'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
		</tr>

		<tr>
			<td data-export-label="HPOS feature screen enabled"><?php esc_html_e( 'HPOS feature screen enabled:', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Is HPOS feature screen enabled?', 'woocommerce' ) ); ?></td>
			<td><?php echo $settings['HPOS_feature_screen_enabled'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
		</tr>
		<tr>
			<td data-export-label="HPOS feature enabled"><?php esc_html_e( 'HPOS enabled:', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Is HPOS enabled?', 'woocommerce' ) ); ?></td>
			<td><?php echo $settings['HPOS_enabled'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
		</tr>
		<tr>
			<td data-export-label="Order datastore"><?php esc_html_e( 'Order datastore:', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Datastore currently in use for orders.', 'woocommerce' ) ); ?></td>
			<td><?php echo esc_html( $settings['order_datastore'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="HPOS data sync enabled"><?php esc_html_e( 'HPOS data sync enabled:', 'woocommerce' ); ?></td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Is data sync enabled for HPOS?', 'woocommerce' ) ); ?></td>
			<td><?php echo $settings['HPOS_sync_enabled'] ? '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>' : '<mark class="no">&ndash;</mark>'; ?></td>
		</tr>

	</tbody>
</table>
<table class="wc_status_table widefat" cellspacing="0">
	<thead>
		<tr>
			<th colspan="3" data-export-label="WC Pages"><h2><?php esc_html_e( 'WooCommerce pages', 'woocommerce' ); ?></h2></th>
		</tr>
	</thead>
	<tbody>
		<?php
		$alt = 1;
		foreach ( $wp_pages as $_page ) {
			$found_error = false;

			if ( $_page['page_id'] ) {
				/* Translators: %s: page name. */
				$page_name = '<a href="' . get_edit_post_link( $_page['page_id'] ) . '" aria-label="' . sprintf( esc_html__( 'Edit %s page', 'woocommerce' ), esc_html( $_page['page_name'] ) ) . '">' . esc_html( $_page['page_name'] ) . '</a>';
			} else {
				$page_name = esc_html( $_page['page_name'] );
			}

			echo '<tr><td data-export-label="' . esc_attr( $page_name ) . '">' . wp_kses_post( $page_name ) . ':</td>';
			/* Translators: %s: page name. */
			echo '<td class="help">' . wc_help_tip( sprintf( esc_html__( 'The URL of your %s page (along with the Page ID).', 'woocommerce' ), $page_name ) ) . '</td><td>';

			// Page ID check.
			if ( ! $_page['page_set'] ) {
				echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Page not set', 'woocommerce' ) . '</mark>';
				$found_error = true;
			} elseif ( ! $_page['page_exists'] ) {
				echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Page ID is set, but the page does not exist', 'woocommerce' ) . '</mark>';
				$found_error = true;
			} elseif ( ! $_page['page_visible'] ) {
				/* Translators: %s: docs link. */
				echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . wp_kses_post( sprintf( __( 'Page visibility should be <a href="%s" target="_blank">public</a>', 'woocommerce' ), 'https://wordpress.org/support/article/content-visibility/' ) ) . '</mark>';
				$found_error = true;
			} else {
				// Shortcode and block check.
				if ( $_page['shortcode_required'] || $_page['block_required'] ) {
					if ( ! $_page['shortcode_present'] && ! $_page['block_present'] ) {
						/* Translators: %1$s: shortcode text, %2$s: block slug. */
						echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . ( $_page['block_required'] ? sprintf( esc_html__( 'Page does not contain the %1$s shortcode or the %2$s block.', 'woocommerce' ), esc_html( $_page['shortcode'] ), esc_html( $_page['block'] ) ) : sprintf( esc_html__( 'Page does not contain the %s shortcode.', 'woocommerce' ), esc_html( $_page['shortcode'] ) ) ) . '</mark>'; /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */
						$found_error = true;
					}
				}
			}

			if ( ! $found_error ) {
				echo '<mark class="yes">#' . absint( $_page['page_id'] ) . ' - ' . esc_html( str_replace( home_url(), '', get_permalink( $_page['page_id'] ) ) ) . '</mark>';
			}

			echo '</td></tr>';
		}
		?>
	</tbody>
</table>
<table class="wc_status_table widefat" cellspacing="0">
	<thead>
		<tr>
			<th colspan="3" data-export-label="Theme"><h2><?php esc_html_e( 'Theme', 'woocommerce' ); ?></h2></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td data-export-label="Name"><?php esc_html_e( 'Name', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The name of the current active theme.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $theme['name'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="Version"><?php esc_html_e( 'Version', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The installed version of the current active theme.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( version_compare( $theme['version'], $theme['version_latest'], '<' ) ) {
					/* translators: 1: current version. 2: latest version */
					echo esc_html( sprintf( __( '%1$s (update to version %2$s is available)', 'woocommerce' ), $theme['version'], $theme['version_latest'] ) );
				} else {
					echo esc_html( $theme['version'] );
				}
				?>
			</td>
		</tr>
		<tr>
			<td data-export-label="Author URL"><?php esc_html_e( 'Author URL', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'The theme developers URL.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td><?php echo esc_html( $theme['author_url'] ); ?></td>
		</tr>
		<tr>
			<td data-export-label="Child Theme"><?php esc_html_e( 'Child theme', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Displays whether or not the current theme is a child theme.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( $theme['is_child_theme'] ) {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
				} else {
					/* Translators: %s docs link. */
					echo '<span class="dashicons dashicons-no-alt"></span> &ndash; ' . wp_kses_post( sprintf( __( 'If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: <a href="%s" target="_blank">How to create a child theme</a>', 'woocommerce' ), 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ) );
				}
				?>
				</td>
		</tr>
		<?php if ( $theme['is_child_theme'] ) : ?>
			<tr>
				<td data-export-label="Parent Theme Name"><?php esc_html_e( 'Parent theme name', 'woocommerce' ); ?>:</td>
				<td class="help"><?php echo wc_help_tip( esc_html__( 'The name of the parent theme.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
				<td><?php echo esc_html( $theme['parent_name'] ); ?></td>
			</tr>
			<tr>
				<td data-export-label="Parent Theme Version"><?php esc_html_e( 'Parent theme version', 'woocommerce' ); ?>:</td>
				<td class="help"><?php echo wc_help_tip( esc_html__( 'The installed version of the parent theme.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
				<td>
					<?php
					echo esc_html( $theme['parent_version'] );
					if ( version_compare( $theme['parent_version'], $theme['parent_version_latest'], '<' ) ) {
						/* translators: %s: parent theme latest version */
						echo ' &ndash; <strong style="color:red;">' . sprintf( esc_html__( '%s is available', 'woocommerce' ), esc_html( $theme['parent_version_latest'] ) ) . '</strong>';
					}
					?>
				</td>
			</tr>
			<tr>
				<td data-export-label="Parent Theme Author URL"><?php esc_html_e( 'Parent theme author URL', 'woocommerce' ); ?>:</td>
				<td class="help"><?php echo wc_help_tip( esc_html__( 'The parent theme developers URL.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
				<td><?php echo esc_html( $theme['parent_author_url'] ); ?></td>
			</tr>
		<?php endif ?>
		<tr>
			<td data-export-label="WooCommerce Support"><?php esc_html_e( 'WooCommerce support', 'woocommerce' ); ?>:</td>
			<td class="help"><?php echo wc_help_tip( esc_html__( 'Displays whether or not the current active theme declares WooCommerce support.', 'woocommerce' ) ); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped */ ?></td>
			<td>
				<?php
				if ( ! $theme['has_woocommerce_support'] ) {
					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . esc_html__( 'Not declared', 'woocommerce' ) . '</mark>';
				} else {
					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
				}
				?>
			</td>
		</tr>
	</tbody>
</table>
<table class="wc_status_table widefat" cellspacing="0">
	<thead>
		<tr>
			<th colspan="3" data-export-label="Templates"><h2><?php esc_html_e( 'Templates', 'woocommerce' ); ?><?php echo wc_help_tip( esc_html__( 'This section shows any files that are overriding the default WooCommerce template pages.', 'woocommerce' ) ); ?></h2></th>
		</tr>
	</thead>
	<tbody>
		<?php if ( $theme['has_woocommerce_file'] ) : ?>
		<tr>
			<td data-export-label="Archive Template"><?php esc_html_e( 'Archive template', 'woocommerce' ); ?>:</td>
			<td class="help">&nbsp;</td>
			<td><?php esc_html_e( 'Your theme has a woocommerce.php file, you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues.', 'woocommerce' ); ?></td>
		</tr>
		<?php endif ?>
		<?php if ( ! empty( $theme['overrides'] ) ) : ?>
			<tr>
				<td data-export-label="Overrides"><?php esc_html_e( 'Overrides', 'woocommerce' ); ?></td>
				<td class="help">&nbsp;</td>
				<td>
					<?php
					$total_overrides = count( $theme['overrides'] );
					for ( $i = 0; $i < $total_overrides; $i++ ) {
						$override = $theme['overrides'][ $i ];
						if ( $override['core_version'] && ( empty( $override['version'] ) || version_compare( $override['version'], $override['core_version'], '<' ) ) ) {
							$current_version = $override['version'] ? $override['version'] : '-';
							printf(
								/* Translators: %1$s: Template name, %2$s: Template version, %3$s: Core version. */
								esc_html__( '%1$s version %2$s is out of date. The core version is %3$s', 'woocommerce' ),
								'<code>' . esc_html( $override['file'] ) . '</code>',
								'<strong style="color:red">' . esc_html( $current_version ) . '</strong>',
								esc_html( $override['core_version'] )
							);
						} else {
							echo esc_html( $override['file'] );
						}
						if ( ( count( $theme['overrides'] ) - 1 ) !== $i ) {
							echo ', ';
						}
						echo '<br />';
					}
					?>
				</td>
			</tr>
		<?php else : ?>
			<tr>
				<td data-export-label="Overrides"><?php esc_html_e( 'Overrides', 'woocommerce' ); ?>:</td>
				<td class="help">&nbsp;</td>
				<td>&ndash;</td>
			</tr>
		<?php endif; ?>

		<?php if ( true === $theme['has_outdated_templates'] ) : ?>
			<tr>
				<td data-export-label="Outdated Templates"><?php esc_html_e( 'Outdated templates', 'woocommerce' ); ?>:</td>
				<td class="help">&nbsp;</td>
				<td>
					<mark class="error">
						<span class="dashicons dashicons-warning"></span>
					</mark>
					<a href="https://docs.woocommerce.com/document/fix-outdated-templates-woocommerce/" target="_blank">
						<?php esc_html_e( 'Learn how to update', 'woocommerce' ); ?>
					</a>
				</td>
			</tr>
		<?php endif; ?>
	</tbody>
</table>

<?php do_action( 'woocommerce_system_status_report' ); ?>

<table class="wc_status_table widefat" cellspacing="0">
	<thead>
	<tr>
		<th colspan="3" data-export-label="Status report information"><h2><?php esc_html_e( 'Status report information', 'woocommerce' ); ?><?php echo wc_help_tip( esc_html__( 'This section shows information about this status report.', 'woocommerce' ) ); ?></h2></th>
	</tr>
	</thead>
	<tbody>
	<tr>
		<td data-export-label="Generated at"><?php esc_html_e( 'Generated at', 'woocommerce' ); ?>:</td>
		<td class="help">&nbsp;</td>
		<td><?php echo esc_html( current_time( 'Y-m-d H:i:s P' ) ); ?></td>

	</tr>
	</tbody>
</table>
html-admin-page-status-tools.php000064400000004102151551052230012674 0ustar00<?php
/**
 * Admin View: Page - Status Tools
 *
 * @package WooCommerce
 */

use Automattic\WooCommerce\Utilities\ArrayUtil;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

foreach ( $tools as $action_name => $tool ) {
	?>
	<form id="<?php echo esc_attr( 'form_' . $action_name ); ?>" method="GET" action="<?php echo esc_attr( esc_url( admin_url( 'admin.php?foo=bar' ) ) ); ?>">
		<?php wp_nonce_field( 'debug_action', '_wpnonce', false ); ?>
		<input type="hidden" name="page" value="wc-status"/>
		<input type="hidden" name="tab" value="tools"/>
		<input type="hidden" name="action" value="<?php echo esc_attr( $action_name ); ?>"/>
	</form>
	<?php
}
?>

<table class="wc_status_table wc_status_table--tools widefat" cellspacing="0">
	<tbody class="tools">
		<?php foreach ( $tools as $action_name => $tool ) : ?>
			<tr class="<?php echo sanitize_html_class( $action_name ); ?>">
				<th>
					<strong class="name"><?php echo esc_html( $tool['name'] ); ?></strong>
					<p class="description">
						<?php
						echo wp_kses_post( $tool['desc'] );
						if ( ! is_null( ArrayUtil::get_value_or_default( $tool, 'selector' ) ) ) {
							$selector = $tool['selector'];
							if ( isset( $selector['description'] ) ) {
								echo '</p><p class="description">';
								echo wp_kses_post( $selector['description'] );
							}
							// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
							echo "&nbsp;&nbsp;<select style='width: 300px;' form='form_$action_name' id='selector_$action_name' data-allow_clear='true' class='{$selector['class']}' name='{$selector['name']}' data-placeholder='{$selector['placeholder']}' data-action='{$selector['search_action']}'></select>";
						}
						?>
					</p>
				</th>
				<td class="run-tool">
					<?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
					<input <?php echo ArrayUtil::is_truthy( $tool, 'disabled' ) ? 'disabled' : ''; ?> type="submit" form="<?php echo 'form_' . $action_name; ?>" class="button button-large" value="<?php echo esc_attr( $tool['button'] ); ?>" />
				</td>
			</tr>
		<?php endforeach; ?>
	</tbody>
</table>
html-admin-page-status.php000064400000002377151551052230011552 0ustar00<?php
/**
 * Admin View: Page - Status
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( $_REQUEST['tab'] ) : 'status';
$tabs        = array(
	'status' => __( 'System status', 'woocommerce' ),
	'tools'  => __( 'Tools', 'woocommerce' ),
	'logs'   => __( 'Logs', 'woocommerce' ),
);
$tabs        = apply_filters( 'woocommerce_admin_status_tabs', $tabs );
?>
<div class="wrap woocommerce">
	<nav class="nav-tab-wrapper woo-nav-tab-wrapper">
		<?php
		foreach ( $tabs as $name => $label ) {
			echo '<a href="' . admin_url( 'admin.php?page=wc-status&tab=' . $name ) . '" class="nav-tab ';
			if ( $current_tab == $name ) {
				echo 'nav-tab-active';
			}
			echo '">' . $label . '</a>';
		}
		?>
	</nav>
	<h1 class="screen-reader-text"><?php echo esc_html( $tabs[ $current_tab ] ); ?></h1>
	<?php
	switch ( $current_tab ) {
		case 'tools':
			WC_Admin_Status::status_tools();
			break;
		case 'logs':
			WC_Admin_Status::status_logs();
			break;
		default:
			if ( array_key_exists( $current_tab, $tabs ) && has_action( 'woocommerce_admin_status_content_' . $current_tab ) ) {
				do_action( 'woocommerce_admin_status_content_' . $current_tab );
			} else {
				WC_Admin_Status::status_report();
			}
			break;
	}
	?>
</div>
html-admin-settings.php000064400000003651151551052230011151 0ustar00<?php
/**
 * Admin View: Settings
 *
 * @package WooCommerce
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$tab_exists        = isset( $tabs[ $current_tab ] ) || has_action( 'woocommerce_sections_' . $current_tab ) || has_action( 'woocommerce_settings_' . $current_tab ) || has_action( 'woocommerce_settings_tabs_' . $current_tab );
$current_tab_label = isset( $tabs[ $current_tab ] ) ? $tabs[ $current_tab ] : '';

if ( ! $tab_exists ) {
	wp_safe_redirect( admin_url( 'admin.php?page=wc-settings' ) );
	exit;
}
?>
<div class="wrap woocommerce">
	<?php do_action( 'woocommerce_before_settings_' . $current_tab ); ?>
	<form method="<?php echo esc_attr( apply_filters( 'woocommerce_settings_form_method_tab_' . $current_tab, 'post' ) ); ?>" id="mainform" action="" enctype="multipart/form-data">
		<nav class="nav-tab-wrapper woo-nav-tab-wrapper">
			<?php

			foreach ( $tabs as $slug => $label ) {
				echo '<a href="' . esc_html( admin_url( 'admin.php?page=wc-settings&tab=' . esc_attr( $slug ) ) ) . '" class="nav-tab ' . ( $current_tab === $slug ? 'nav-tab-active' : '' ) . '">' . esc_html( $label ) . '</a>';
			}

			do_action( 'woocommerce_settings_tabs' );

			?>
		</nav>
		<h1 class="screen-reader-text"><?php echo esc_html( $current_tab_label ); ?></h1>
		<?php
			do_action( 'woocommerce_sections_' . $current_tab );

			self::show_messages();

			do_action( 'woocommerce_settings_' . $current_tab );
			do_action( 'woocommerce_settings_tabs_' . $current_tab ); // @deprecated 3.4.0 hook.
		?>
		<p class="submit">
			<?php if ( empty( $GLOBALS['hide_save_button'] ) ) : ?>
				<button name="save" class="button-primary woocommerce-save-button" type="submit" value="<?php esc_attr_e( 'Save changes', 'woocommerce' ); ?>"><?php esc_html_e( 'Save changes', 'woocommerce' ); ?></button>
			<?php endif; ?>
			<?php wp_nonce_field( 'woocommerce-settings' ); ?>
		</p>
	</form>
	<?php do_action( 'woocommerce_after_settings_' . $current_tab ); ?>
</div>
html-bulk-edit-product.php000064400000027545151551052230011571 0ustar00<?php
/**
 * Admin View: Bulk Edit Products
 */

use Automattic\WooCommerce\Utilities\I18nUtil;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

?>

<fieldset class="inline-edit-col-right">
	<div id="woocommerce-fields-bulk" class="inline-edit-col">

		<h4><?php _e( 'Product data', 'woocommerce' ); ?></h4>

		<?php do_action( 'woocommerce_product_bulk_edit_start' ); ?>

		<div class="inline-edit-group">
			<label class="alignleft">
				<span class="title"><?php _e( 'Price', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<select class="change_regular_price change_to" name="change_regular_price">
						<?php
						$options = array(
							''  => __( '— No change —', 'woocommerce' ),
							'1' => __( 'Change to:', 'woocommerce' ),
							'2' => __( 'Increase existing price by (fixed amount or %):', 'woocommerce' ),
							'3' => __( 'Decrease existing price by (fixed amount or %):', 'woocommerce' ),
						);
						foreach ( $options as $key => $value ) {
							echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
						}
						?>
					</select>
				</span>
			</label>
			<label class="change-input">
				<input type="text" name="_regular_price" class="text regular_price" placeholder="<?php printf( esc_attr__( 'Enter price (%s)', 'woocommerce' ), get_woocommerce_currency_symbol() ); ?>" value="" />
			</label>
		</div>

		<div class="inline-edit-group">
			<label class="alignleft">
				<span class="title"><?php _e( 'Sale', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<select class="change_sale_price change_to" name="change_sale_price">
						<?php
						$options = array(
							''  => __( '— No change —', 'woocommerce' ),
							'1' => __( 'Change to:', 'woocommerce' ),
							'2' => __( 'Increase existing sale price by (fixed amount or %):', 'woocommerce' ),
							'3' => __( 'Decrease existing sale price by (fixed amount or %):', 'woocommerce' ),
							'4' => __( 'Set to regular price decreased by (fixed amount or %):', 'woocommerce' ),
						);
						foreach ( $options as $key => $value ) {
							echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
						}
						?>
					</select>
				</span>
			</label>
			<label class="change-input">
				<input type="text" name="_sale_price" class="text sale_price" placeholder="<?php printf( esc_attr__( 'Enter sale price (%s)', 'woocommerce' ), get_woocommerce_currency_symbol() ); ?>" value="" />
			</label>
		</div>

		<?php if ( wc_tax_enabled() ) : ?>
			<label>
				<span class="title"><?php _e( 'Tax status', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<select class="tax_status" name="_tax_status">
						<?php
						$options = array(
							''         => __( '— No change —', 'woocommerce' ),
							'taxable'  => __( 'Taxable', 'woocommerce' ),
							'shipping' => __( 'Shipping only', 'woocommerce' ),
							'none'     => _x( 'None', 'Tax status', 'woocommerce' ),
						);
						foreach ( $options as $key => $value ) {
							echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
						}
						?>
					</select>
				</span>
			</label>

			<label>
				<span class="title"><?php _e( 'Tax class', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<select class="tax_class" name="_tax_class">
						<?php
						$options = array(
							''         => __( '— No change —', 'woocommerce' ),
							'standard' => __( 'Standard', 'woocommerce' ),
						);

						$tax_classes = WC_Tax::get_tax_classes();

						if ( ! empty( $tax_classes ) ) {
							foreach ( $tax_classes as $class ) {
								$options[ sanitize_title( $class ) ] = esc_html( $class );
							}
						}

						foreach ( $options as $key => $value ) {
							echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
						}
						?>
					</select>
				</span>
			</label>
		<?php endif; ?>

		<?php if ( wc_product_weight_enabled() ) : ?>
			<div class="inline-edit-group">
				<label class="alignleft">
					<span class="title"><?php _e( 'Weight', 'woocommerce' ); ?></span>
					<span class="input-text-wrap">
						<select class="change_weight change_to" name="change_weight">
							<?php
								$options = array(
									''  => __( '— No change —', 'woocommerce' ),
									'1' => __( 'Change to:', 'woocommerce' ),
								);
							foreach ( $options as $key => $value ) {
								echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
							}
							?>
						</select>
					</span>
				</label>
				<label class="change-input">
					<?php
					$placeholder = sprintf(
						/* translators: 1. Weight number; 2. Weight unit; E.g. 2 kg */
						__( '%1$s (%2$s)', 'woocommerce' ),
						wc_format_localized_decimal( 0 ),
						I18nUtil::get_weight_unit_label( get_option( 'woocommerce_weight_unit', 'kg' ) )
					);
					?>
					<input
						type="text"
						name="_weight"
						class="text weight"
						placeholder="<?php echo esc_attr( $placeholder ); ?>"
						value=""
					>
				</label>
			</div>
		<?php endif; ?>

		<?php if ( wc_product_dimensions_enabled() ) : ?>
			<div class="inline-edit-group dimensions">
				<label class="alignleft">
					<span class="title"><?php _e( 'L/W/H', 'woocommerce' ); ?></span>
					<span class="input-text-wrap">
						<select class="change_dimensions change_to" name="change_dimensions">
							<?php
							$options = array(
								''  => __( '— No change —', 'woocommerce' ),
								'1' => __( 'Change to:', 'woocommerce' ),
							);
							foreach ( $options as $key => $value ) {
								echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
							}
							?>
						</select>
					</span>
				</label>
				<label class="change-input">
					<?php
					$dimension_unit_label = I18nUtil::get_dimensions_unit_label( get_option( 'woocommerce_dimension_unit', 'cm' ) );
					?>
					<input
						type="text"
						name="_length"
						class="text length"
						<?php /* translators: %s is dimension unit label */ ?>
						placeholder="<?php printf( esc_attr__( 'Length (%s)', 'woocommerce' ), esc_html( $dimension_unit_label ) ); ?>"
						value=""
					>
					<input
						type="text"
						name="_width"
						class="text width"
						<?php /* translators: %s is dimension unit label */ ?>
						placeholder="<?php printf( esc_attr__( 'Width (%s)', 'woocommerce' ), esc_html( $dimension_unit_label ) ); ?>"
						value=""
					>
					<input
						type="text"
						name="_height"
						class="text height"
						<?php /* translators: %s is dimension unit label */ ?>
						placeholder="<?php printf( esc_attr__( 'Height (%s)', 'woocommerce' ), esc_html( $dimension_unit_label ) ); ?>"
						value=""
					>
				</label>
			</div>
		<?php endif; ?>

		<label>
			<span class="title"><?php _e( 'Shipping class', 'woocommerce' ); ?></span>
			<span class="input-text-wrap">
				<select class="shipping_class" name="_shipping_class">
					<option value=""><?php _e( '— No change —', 'woocommerce' ); ?></option>
					<option value="_no_shipping_class"><?php _e( 'No shipping class', 'woocommerce' ); ?></option>
					<?php
					foreach ( $shipping_class as $key => $value ) {
						echo '<option value="' . esc_attr( $value->slug ) . '">' . esc_html( $value->name ) . '</option>';
					}
					?>
				</select>
			</span>
		</label>

		<label>
			<span class="title"><?php _e( 'Visibility', 'woocommerce' ); ?></span>
			<span class="input-text-wrap">
				<select class="visibility" name="_visibility">
					<?php
					$options = array(
						''        => __( '— No change —', 'woocommerce' ),
						'visible' => __( 'Catalog &amp; search', 'woocommerce' ),
						'catalog' => __( 'Catalog', 'woocommerce' ),
						'search'  => __( 'Search', 'woocommerce' ),
						'hidden'  => __( 'Hidden', 'woocommerce' ),
					);
					foreach ( $options as $key => $value ) {
						echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
					}
					?>
				</select>
			</span>
		</label>
		<label>
			<span class="title"><?php _e( 'Featured', 'woocommerce' ); ?></span>
			<span class="input-text-wrap">
				<select class="featured" name="_featured">
					<?php
					$options = array(
						''    => __( '— No change —', 'woocommerce' ),
						'yes' => __( 'Yes', 'woocommerce' ),
						'no'  => __( 'No', 'woocommerce' ),
					);
					foreach ( $options as $key => $value ) {
						echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
					}
					?>
				</select>
			</span>
		</label>

		<label>
			<span class="title"><?php _e( 'In stock?', 'woocommerce' ); ?></span>
			<span class="input-text-wrap">
				<select class="stock_status" name="_stock_status">
					<?php
					echo '<option value="">' . esc_html__( '— No Change —', 'woocommerce' ) . '</option>';

					foreach ( wc_get_product_stock_status_options() as $key => $value ) {
						echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
					}
					?>
				</select>
			</span>
		</label>
		<?php if ( 'yes' == get_option( 'woocommerce_manage_stock' ) ) : ?>

			<label>
				<span class="title"><?php _e( 'Manage stock?', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<select class="manage_stock" name="_manage_stock">
						<?php
						$options = array(
							''    => __( '— No change —', 'woocommerce' ),
							'yes' => __( 'Yes', 'woocommerce' ),
							'no'  => __( 'No', 'woocommerce' ),
						);
						foreach ( $options as $key => $value ) {
							echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
						}
						?>
					</select>
				</span>
			</label>

			<div class="inline-edit-group">
				<label class="alignleft stock_qty_field">
					<span class="title"><?php _e( 'Stock qty', 'woocommerce' ); ?></span>
					<span class="input-text-wrap">
						<select class="change_stock change_to" name="change_stock">
							<?php
							$options = array(
								''  => __( '— No change —', 'woocommerce' ),
								'1' => __( 'Change to:', 'woocommerce' ),
								'2' => __( 'Increase existing stock by:', 'woocommerce' ),
								'3' => __( 'Decrease existing stock by:', 'woocommerce' ),
							);
							foreach ( $options as $key => $value ) {
								echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
							}
							?>
						</select>
					</span>
				</label>
				<label class="change-input">
					<input type="text" name="_stock" class="text stock" placeholder="<?php esc_attr_e( 'Stock qty', 'woocommerce' ); ?>" step="any" value="">
				</label>
			</div>

			<label>
				<span class="title"><?php _e( 'Backorders?', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<select class="backorders" name="_backorders">
						<?php
						echo '<option value="">' . esc_html__( '— No Change —', 'woocommerce' ) . '</option>';

						foreach ( wc_get_product_backorder_options() as $key => $value ) {
							echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
						}
						?>
					</select>
				</span>
			</label>

		<?php endif; ?>

		<label>
			<span class="title"><?php esc_html_e( 'Sold individually?', 'woocommerce' ); ?></span>
			<span class="input-text-wrap">
				<select class="sold_individually" name="_sold_individually">
					<?php
					$options = array(
						''    => __( '— No change —', 'woocommerce' ),
						'yes' => __( 'Yes', 'woocommerce' ),
						'no'  => __( 'No', 'woocommerce' ),
					);
					foreach ( $options as $key => $value ) {
						echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
					}
					?>
				</select>
			</span>
		</label>

		<?php do_action( 'woocommerce_product_bulk_edit_end' ); ?>

		<input type="hidden" name="woocommerce_bulk_edit" value="1" />
		<input type="hidden" name="woocommerce_quick_edit_nonce" value="<?php echo wp_create_nonce( 'woocommerce_quick_edit_nonce' ); ?>" />
	</div>
</fieldset>
html-email-template-preview.php000064400000002034151551052230012574 0ustar00<?php
/**
 * Admin View: Email Template Preview
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

?>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed aliquet diam a facilisis eleifend. Cras ac justo felis. Mauris faucibus, orci eu blandit fermentum, lorem nibh sollicitudin mi, sit amet interdum metus urna ut lacus.</p>

<p><a class="link" href="#">Sed sit amet sapien odio</a></p>

<p>Phasellus quis varius augue. Fusce eu euismod leo, a accumsan tellus. Quisque vitae dolor eu justo cursus egestas. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sit amet sapien odio. Sed pellentesque arcu mi, quis malesuada lectus lacinia et. Cras a tempor leo.</p>

<h2>Lorem ipsum dolor</h2>

<p>Fusce eu euismod leo, a accumsan tellus. Quisque vitae dolor eu justo cursus egestas. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sit amet sapien odio. Sed pellentesque arcu mi, quis malesuada lectus lacinia et. Cras a tempor leo.</p>
html-notice-base-table-missing.php000064400000003111151551052230013137 0ustar00<?php
/**
 * Admin View: Notice - Base table missing.
 *
 * @package WooCommerce\Admin
 */

defined( 'ABSPATH' ) || exit;

?>
<div class="updated woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'base_tables_missing' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>">
		<?php esc_html_e( 'Dismiss', 'woocommerce' ); ?>
	</a>

	<p>
		<strong><?php esc_html_e( 'Database tables missing', 'woocommerce' ); ?></strong>
	</p>
	<p>
		<?php
		$verify_db_tool_available = array_key_exists( 'verify_db_tables', WC_Admin_Status::get_tools() );
		$missing_tables           = get_option( 'woocommerce_schema_missing_tables' );
		if ( $verify_db_tool_available ) {
			echo wp_kses_post(
				sprintf(
				/* translators: %1%s: Missing tables (separated by ",") %2$s: Link to check again */
					__( 'One or more tables required for WooCommerce to function are missing, some features may not work as expected. Missing tables: %1$s. <a href="%2$s">Check again.</a>', 'woocommerce' ),
					esc_html( implode( ', ', $missing_tables ) ),
					wp_nonce_url( admin_url( 'admin.php?page=wc-status&tab=tools&action=verify_db_tables' ), 'debug_action' )
				)
			);
		} else {
			echo wp_kses_post(
				sprintf(
				/* translators: %1%s: Missing tables (separated by ",") */
					__( 'One or more tables required for WooCommerce to function are missing, some features may not work as expected. Missing tables: %1$s.', 'woocommerce' ),
					esc_html( implode( ', ', $missing_tables ) )
				)
			);
		}
		?>
	</p>
</div>
html-notice-custom.php000064400000000704151551052230011010 0ustar00<?php
/**
 * Admin View: Custom Notices
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

?>
<div id="message" class="updated woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', $notice ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php _e( 'Dismiss', 'woocommerce' ); ?></a>
	<?php echo wp_kses_post( wpautop( $notice_html ) ); ?>
</div>
html-notice-download-dir-sync-complete.php000064400000002264151551052230014644 0ustar00<?php
/**
 * Admin View: Notice - Product downloads directories sync complete.
 */

defined( 'ABSPATH' ) || exit;

?>
<div id="message" class="updated woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'download_directories_sync_complete' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php _e( 'Dismiss', 'woocommerce' ); ?></a>

	<p>
		<?php
		$settings_screen_link = '<a href="' . esc_url( get_admin_url( null, 'admin.php?page=wc-settings&tab=products&section=download_urls' ) ) . '">';
		$documentation_link   = '<a href="https://woocommerce.com/document/approved-download-directories">';
		$closing_link         = '</a>';

		printf(
			/* translators: %1$s and %3$s are HTML (opening link tags). %2$s is also HTML (closing link tag). */
			esc_html__( 'The %1$sApproved Product Download Directories list%2$s has been updated. To protect your site, please review the list and make any changes that might be required. For more information, please refer to %3$sthis guide%2$s.', 'woocommerce' ),
			$settings_screen_link,
			$closing_link,
			$documentation_link
		);
		?>
	</p>
</div>
html-notice-install.php000064400000001334151551052230011144 0ustar00<?php
/**
 * Admin View: Notice - Install
 *
 * @deprecated 4.6.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

?>
<div id="message" class="updated woocommerce-message wc-connect">
	<p><?php _e( '<strong>Welcome to WooCommerce</strong> &#8211; You&lsquo;re almost ready to start selling :)', 'woocommerce' ); ?></p>
	<p class="submit"><a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-setup' ) ); ?>" class="button-primary"><?php _e( 'Run the Setup Wizard', 'woocommerce' ); ?></a> <a class="button-secondary skip" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'install' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php _e( 'Skip setup', 'woocommerce' ); ?></a></p>
</div>
html-notice-legacy-shipping.php000064400000003232151551052230012560 0ustar00<?php
/**
 * Admin View: Notice - Legacy Shipping.
 *
 * @package WooCommerce\Admin\Notices
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div id="message" class="updated woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'legacy_shipping' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>">
		<?php esc_html_e( 'Dismiss', 'woocommerce' ); ?>
	</a>

	<p class="main">
		<strong><?php esc_html_e( 'New:', 'woocommerce' ); ?> <?php esc_html_e( 'Shipping zones', 'woocommerce' ); ?></strong> &#8211; <?php esc_html_e( 'a group of regions that can be assigned different shipping methods and rates.', 'woocommerce' ); ?>
	</p>
	<p>
		<?php esc_html_e( 'Legacy shipping methods (flat rate, international flat rate, local pickup and delivery, and free shipping) are deprecated but will continue to work as normal for now. <b><em>They will be removed in future versions of WooCommerce</em></b>. We recommend disabling these and setting up new rates within shipping zones as soon as possible.', 'woocommerce' ); ?>
	</p>

	<p class="submit">
		<?php if ( empty( $_GET['page'] ) || empty( $_GET['tab'] ) || 'wc-settings' !== $_GET['page'] || 'shipping' !== $_GET['tab'] ) : ?>
			<a class="button-primary" href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=shipping' ) ); ?>">
				<?php esc_html_e( 'Setup shipping zones', 'woocommerce' ); ?>
			</a>
		<?php endif; ?>
		<a class="button-secondary" href="https://docs.woocommerce.com/document/setting-up-shipping-zones/">
			<?php esc_html_e( 'Learn more about shipping zones', 'woocommerce' ); ?>
		</a>
	</p>
</div>
html-notice-maxmind-license-key.php000064400000002232151551052230013337 0ustar00<?php
/**
 * Admin View: Notice - Missing MaxMind license key
 *
 * @package WooCommerce\Admin
 */

defined( 'ABSPATH' ) || exit;

?>

<div id="message" class="updated woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'maxmind_license_key' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>

	<p>
		<strong><?php esc_html_e( 'Geolocation has not been configured.', 'woocommerce' ); ?></strong>
	</p>

	<p>
		<?php
		echo wp_kses_post(
			sprintf(
				/* translators: %1%s: integration page %2$s: general settings page */
				__( 'You must enter a valid license key on the <a href="%1$s">MaxMind integration settings page</a> in order to use the geolocation service. If you do not need geolocation for shipping or taxes, you should change the default customer location on the <a href="%2$s">general settings page</a>.', 'woocommerce' ),
				admin_url( 'admin.php?page=wc-settings&tab=integration&section=maxmind_geolocation' ),
				admin_url( 'admin.php?page=wc-settings&tab=general' )
			)
		);
		?>
	</p>
</div>
html-notice-no-shipping-methods.php000064400000002450151551052230013372 0ustar00<?php
/**
 * Admin View: Notice - No Shipping methods.
 *
 * @package WooCommerce\Admin\Notices
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div id="message" class="updated woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'no_shipping_methods' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>">
		<?php esc_html_e( 'Dismiss', 'woocommerce' ); ?>
	</a>

	<p class="main">
		<strong>
			<?php esc_html_e( 'Add shipping methods &amp; zones', 'woocommerce' ); ?>
		</strong>
	</p>
	<p>
		<?php esc_html_e( 'Shipping is currently enabled, but you have not added any shipping methods to your shipping zones.', 'woocommerce' ); ?>
	</p>
	<p>
		<?php esc_html_e( 'Customers will not be able to purchase physical goods from your store until a shipping method is available.', 'woocommerce' ); ?>
	</p>

	<p class="submit">
		<a class="button-primary" href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=shipping' ) ); ?>">
			<?php esc_html_e( 'Setup shipping zones', 'woocommerce' ); ?>
		</a>
		<a class="button-secondary" href="https://docs.woocommerce.com/document/setting-up-shipping-zones/">
			<?php esc_html_e( 'Learn more about shipping zones', 'woocommerce' ); ?>
		</a>
	</p>
</div>
html-notice-redirect-only-download.php000064400000002315151551052230014063 0ustar00<?php
/**
 * Admin View: Notice - Redirect only download method is selected.
 *
 * @package WooCommerce\Admin\Notices
 */

defined( 'ABSPATH' ) || exit;

?>
<div class="updated woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'redirect_download_method' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>
	<p>
		<?php
		echo wp_kses_post(
			sprintf(
				/* translators: %s: Link to settings page. */
				__( 'Your store is configured to serve digital products using "Redirect only" method. This method is deprecated, <a href="%s">please switch to a different method instead.</a><br><em>If you use a remote server for downloadable files (such as Google Drive, Dropbox, Amazon S3), you may optionally wish to "allow using redirects as a last resort". Enabling that and/or selecting any of the other options will make this notice go away.</em>', 'woocommerce' ),
				add_query_arg(
					array(
						'page'    => 'wc-settings',
						'tab'     => 'products',
						'section' => 'downloadable',
					),
					admin_url( 'admin.php' )
				)
			)
		);
		?>
	</p>
</div>
html-notice-regenerating-lookup-table.php000064400000002256151551052230014550 0ustar00<?php
/**
 * Admin View: Notice - Regenerating product lookup table.
 *
 * @package WooCommerce\Admin
 */

use Automattic\Jetpack\Constants;

defined( 'ABSPATH' ) || exit;

$pending_actions_url = admin_url( 'admin.php?page=wc-status&tab=action-scheduler&s=wc_update_product_lookup_tables&status=pending' );
$cron_disabled       = Constants::is_true( 'DISABLE_WP_CRON' );
$cron_cta            = $cron_disabled ? __( 'You can manually run queued updates here.', 'woocommerce' ) : __( 'View progress &rarr;', 'woocommerce' );
?>
<div id="message" class="updated woocommerce-message">
	<p>
		<strong><?php esc_html_e( 'WooCommerce is updating product data in the background', 'woocommerce' ); ?></strong><br>
		<?php
		esc_html_e( 'Product display, sorting, and reports may not be accurate until this finishes. It will take a few minutes and this notice will disappear when complete.', 'woocommerce' );

		if ( $cron_disabled ) {
			echo '<br>' . esc_html__( 'Note: WP CRON has been disabled on your install which may prevent this update from completing.', 'woocommerce' );
		}
		?>
		&nbsp;<a href="<?php echo esc_url( $pending_actions_url ); ?>"><?php echo esc_html( $cron_cta ); ?></a>
	</p>
</div>
html-notice-regenerating-thumbnails.php000064400000001152151551052230014312 0ustar00<?php
/**
 * Admin View: Notice - Regenerating thumbnails.
 */

defined( 'ABSPATH' ) || exit;

?>
<div id="message" class="updated woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'regenerating_thumbnails' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php _e( 'Cancel thumbnail regeneration', 'woocommerce' ); ?></a>

	<p><?php esc_html_e( 'Thumbnail regeneration is running in the background. Depending on the amount of images in your store this may take a while.', 'woocommerce' ); ?></p>
</div>
html-notice-secure-connection.php000064400000001525151551052230013123 0ustar00<?php
/**
 * Admin View: Notice - Secure connection.
 *
 * @package WooCommerce\Admin\Notices
 */

defined( 'ABSPATH' ) || exit;

?>
<div id="message" class="updated woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'no_secure_connection' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>

	<p>
	<?php
		echo wp_kses_post( sprintf(
			/* translators: %s: documentation URL */
			__( 'Your store does not appear to be using a secure connection. We highly recommend serving your entire website over an HTTPS connection to help keep customer data secure. <a href="%s">Learn more here.</a>', 'woocommerce' ),
			'https://docs.woocommerce.com/document/ssl-and-https/'
		) );
	?>
	</p>
</div>
html-notice-template-check.php000064400000003253151551052230012366 0ustar00<?php
/**
 * Admin View: Notice - Template Check
 *
 * @package WooCommerce\Views
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$theme = wp_get_theme();
?>
<div id="message" class="updated woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'template_files' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>

	<p>
		<?php /* translators: %s: theme name */ ?>
		<?php printf( __( '<strong>Your theme (%s) contains outdated copies of some WooCommerce template files.</strong> These files may need updating to ensure they are compatible with the current version of WooCommerce. Suggestions to fix this:', 'woocommerce' ), esc_html( $theme['Name'] ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
		<ol>
			<li><?php esc_html_e( 'Update your theme to the latest version. If no update is available contact your theme author asking about compatibility with the current WooCommerce version.', 'woocommerce' ); ?></li>
			<li><?php esc_html_e( 'If you copied over a template file to change something, then you will need to copy the new version of the template and apply your changes again.', 'woocommerce' ); ?></li>
		</ol>
	</p>
	<p class="submit">
		<a class="button-primary" href="https://docs.woocommerce.com/document/template-structure/" target="_blank"><?php esc_html_e( 'Learn more about templates', 'woocommerce' ); ?></a>
		<a class="button-primary" href="<?php echo esc_url( admin_url( 'admin.php?page=wc-status' ) ); ?>" target="_blank"><?php esc_html_e( 'View affected templates', 'woocommerce' ); ?></a>
	</p>
</div>
html-notice-update.php000064400000002560151551052230010762 0ustar00<?php
/**
 * Admin View: Notice - Update
 *
 * @package WooCommerce\Admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$update_url = wp_nonce_url(
	add_query_arg( 'do_update_woocommerce', 'true', admin_url( 'admin.php?page=wc-settings' ) ),
	'wc_db_update',
	'wc_db_update_nonce'
);

?>
<div id="message" class="updated woocommerce-message wc-connect">
	<p>
		<strong><?php esc_html_e( 'WooCommerce database update required', 'woocommerce' ); ?></strong>
	</p>
	<p>
		<?php
			esc_html_e( 'WooCommerce has been updated! To keep things running smoothly, we have to update your database to the newest version.', 'woocommerce' );

			/* translators: 1: Link to docs 2: Close link. */
			printf( ' ' . esc_html__( 'The database update process runs in the background and may take a little while, so please be patient. Advanced users can alternatively update via %1$sWP CLI%2$s.', 'woocommerce' ), '<a href="https://github.com/woocommerce/woocommerce/wiki/Upgrading-the-database-using-WP-CLI">', '</a>' );
		?>
	</p>
	<p class="submit">
		<a href="<?php echo esc_url( $update_url ); ?>" class="wc-update-now button-primary">
			<?php esc_html_e( 'Update WooCommerce Database', 'woocommerce' ); ?>
		</a>
		<a href="https://docs.woocommerce.com/document/how-to-update-woocommerce/" class="button-secondary">
			<?php esc_html_e( 'Learn more about updates', 'woocommerce' ); ?>
		</a>
	</p>
</div>
html-notice-updated.php000064400000001224151551052230011122 0ustar00<?php
/**
 * Admin View: Notice - Updated.
 *
 * @package WooCommerce\Admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

?>
<div id="message" class="updated woocommerce-message wc-connect woocommerce-message--success">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'update', remove_query_arg( 'do_update_woocommerce' ) ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>

	<p><?php esc_html_e( 'WooCommerce database update complete. Thank you for updating to the latest version!', 'woocommerce' ); ?></p>
</div>
html-notice-updating.php000064400000002171151551052230011311 0ustar00<?php
/**
 * Admin View: Notice - Updating
 *
 * @package WooCommerce\Admin
 */

use Automattic\Jetpack\Constants;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$pending_actions_url = admin_url( 'admin.php?page=wc-status&tab=action-scheduler&s=woocommerce_run_update&status=pending' );
$cron_disabled       = Constants::is_true( 'DISABLE_WP_CRON' );
$cron_cta            = $cron_disabled ? __( 'You can manually run queued updates here.', 'woocommerce' ) : __( 'View progress &rarr;', 'woocommerce' );
?>
<div id="message" class="updated woocommerce-message wc-connect">
	<p>
		<strong><?php esc_html_e( 'WooCommerce database update', 'woocommerce' ); ?></strong><br>
		<?php esc_html_e( 'WooCommerce is updating the database in the background. The database update process may take a little while, so please be patient.', 'woocommerce' ); ?>
		<?php
		if ( $cron_disabled ) {
			echo '<br>' . esc_html__( 'Note: WP CRON has been disabled on your install which may prevent this update from completing.', 'woocommerce' );
		}
		?>
		&nbsp;<a href="<?php echo esc_url( $pending_actions_url ); ?>"><?php echo esc_html( $cron_cta ); ?></a>
	</p>
</div>
html-notice-uploads-directory-is-unprotected.php000064400000002041151551052230016106 0ustar00<?php
/**
 * Admin View: Notice - Uploads directory is unprotected.
 *
 * @package WooCommerce\Admin\Notices
 * @since   4.2.0
 */

defined( 'ABSPATH' ) || exit;

$uploads = wp_get_upload_dir();

?>
<div id="message" class="error woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'uploads_directory_is_unprotected' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>

	<p>
	<?php
		echo wp_kses_post(
			sprintf(
				/* translators: 1: uploads directory URL 2: documentation URL */
				__( 'Your store\'s uploads directory is <a href="%1$s">browsable via the web</a>. We strongly recommend <a href="%2$s">configuring your web server to prevent directory indexing</a>.', 'woocommerce' ),
				esc_url( $uploads['baseurl'] . '/woocommerce_uploads' ),
				'https://docs.woocommerce.com/document/digital-downloadable-product-handling/#protecting-your-uploads-directory'
			)
		);
		?>
	</p>
</div>
html-notice-wp-php-minimum-requirements.php000064400000001652151551052230015106 0ustar00<?php
/**
 * Admin View: Notice - PHP & WP minimum requirements.
 *
 * @package WooCommerce\Admin\Notices
 */

defined( 'ABSPATH' ) || exit;
?>
<div id="message" class="updated woocommerce-message">
	<a class="woocommerce-message-close notice-dismiss" href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', WC_PHP_MIN_REQUIREMENTS_NOTICE ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?>"><?php esc_html_e( 'Dismiss', 'woocommerce' ); ?></a>

	<p>
		<?php
		echo wp_kses_post(
			sprintf(
				$msg . '<p><a href="%s" class="button button-primary">' . __( 'Learn how to upgrade', 'woocommerce' ) . '</a></p>',
				add_query_arg(
					array(
						'utm_source'   => 'wpphpupdatebanner',
						'utm_medium'   => 'product',
						'utm_campaign' => 'woocommerceplugin',
						'utm_content'  => 'docs',
					),
					'https://docs.woocommerce.com/document/update-php-wordpress/'
				)
			)
		);
		?>
	</p>
</div>
html-quick-edit-product.php000064400000017154151551052230011743 0ustar00<?php
/**
 * Admin View: Quick Edit Product
 *
 * @package WooCommerce\Admin\Notices
 */

defined( 'ABSPATH' ) || exit;
?>

<fieldset class="inline-edit-col-left">
	<div id="woocommerce-fields" class="inline-edit-col">

		<h4><?php esc_html_e( 'Product data', 'woocommerce' ); ?></h4>

		<?php do_action( 'woocommerce_product_quick_edit_start' ); ?>

		<?php if ( wc_product_sku_enabled() ) : ?>

			<label>
				<span class="title"><?php esc_html_e( 'SKU', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<input type="text" name="_sku" class="text sku" value="">
				</span>
			</label>
			<br class="clear" />

		<?php endif; ?>

		<div class="price_fields">
			<label>
				<span class="title"><?php esc_html_e( 'Price', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<input type="text" name="_regular_price" class="text wc_input_price regular_price" placeholder="<?php esc_attr_e( 'Regular price', 'woocommerce' ); ?>" value="">
				</span>
			</label>
			<br class="clear" />
			<label>
				<span class="title"><?php esc_html_e( 'Sale', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<input type="text" name="_sale_price" class="text wc_input_price sale_price" placeholder="<?php esc_attr_e( 'Sale price', 'woocommerce' ); ?>" value="">
				</span>
			</label>
			<br class="clear" />
		</div>

		<?php if ( wc_tax_enabled() ) : ?>
			<label class="alignleft">
				<span class="title"><?php esc_html_e( 'Tax status', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<select class="tax_status" name="_tax_status">
						<?php
						$options = array(
							'taxable'  => __( 'Taxable', 'woocommerce' ),
							'shipping' => __( 'Shipping only', 'woocommerce' ),
							'none'     => _x( 'None', 'Tax status', 'woocommerce' ),
						);
						foreach ( $options as $key => $value ) {
							echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
						}
						?>
					</select>
				</span>
			</label>
			<br class="clear" />
			<label class="alignleft">
				<span class="title"><?php esc_html_e( 'Tax class', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<select class="tax_class" name="_tax_class">
						<?php
						$options = array(
							'' => __( 'Standard', 'woocommerce' ),
						);

						$tax_classes = WC_Tax::get_tax_classes();

						if ( ! empty( $tax_classes ) ) {
							foreach ( $tax_classes as $class ) {
								$options[ sanitize_title( $class ) ] = esc_html( $class );
							}
						}

						foreach ( $options as $key => $value ) {
							echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
						}
						?>
					</select>
				</span>
			</label>
			<br class="clear" />
		<?php endif; ?>

		<?php if ( wc_product_weight_enabled() || wc_product_dimensions_enabled() ) : ?>
		<div class="dimension_fields">

			<?php if ( wc_product_weight_enabled() ) : ?>
				<label>
					<span class="title"><?php esc_html_e( 'Weight', 'woocommerce' ); ?></span>
					<span class="input-text-wrap">
						<input type="text" name="_weight" class="text weight" placeholder="<?php echo esc_attr( wc_format_localized_decimal( 0 ) ); ?>" value="">
					</span>
				</label>
				<br class="clear" />
			<?php endif; ?>

			<?php if ( wc_product_dimensions_enabled() ) : ?>
				<div class="inline-edit-group dimensions">
					<div>
						<span class="title"><?php esc_html_e( 'L/W/H', 'woocommerce' ); ?></span>
						<span class="input-text-wrap">
							<input type="text" name="_length" class="text wc_input_decimal length" placeholder="<?php esc_attr_e( 'Length', 'woocommerce' ); ?>" value="">
							<input type="text" name="_width" class="text wc_input_decimal width" placeholder="<?php esc_attr_e( 'Width', 'woocommerce' ); ?>" value="">
							<input type="text" name="_height" class="text wc_input_decimal height" placeholder="<?php esc_attr_e( 'Height', 'woocommerce' ); ?>" value="">
						</span>
					</div>
				</div>
			<?php endif; ?>

		</div>
		<?php endif; ?>

		<div class="inline-edit-group">
			<span class="title"><?php esc_html_e( 'Shipping class', 'woocommerce' ); ?></span>
			<span class="input-text-wrap">
				<select class="shipping_class" name="_shipping_class">
					<option value="_no_shipping_class"><?php esc_html_e( 'No shipping class', 'woocommerce' ); ?></option>
					<?php
					foreach ( $shipping_class as $key => $value ) {
						echo '<option value="' . esc_attr( $value->slug ) . '">' . esc_html( $value->name ) . '</option>';
					}
					?>
				</select>
			</span>
		</div>

		<div class="inline-edit-group">
			<label class="alignleft">
				<span class="title"><?php esc_html_e( 'Visibility', 'woocommerce' ); ?></span>
				<span class="input-text-wrap">
					<select class="visibility" name="_visibility">
						<?php
						$options = apply_filters(
							'woocommerce_product_visibility_options',
							array(
								'visible' => __( 'Catalog &amp; search', 'woocommerce' ),
								'catalog' => __( 'Catalog', 'woocommerce' ),
								'search'  => __( 'Search', 'woocommerce' ),
								'hidden'  => __( 'Hidden', 'woocommerce' ),
							)
						);
						foreach ( $options as $key => $value ) {
							echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
						}
						?>
					</select>
				</span>
			</label>
			<label class="alignleft featured">
				<input type="checkbox" name="_featured" value="1">
				<span class="checkbox-title"><?php esc_html_e( 'Featured', 'woocommerce' ); ?></span>
			</label>
		</div>

		<?php if ( get_option( 'woocommerce_manage_stock' ) === 'yes' ) : ?>
			<div class="inline-edit-group manage_stock_field">
				<label class="manage_stock">
					<input type="checkbox" name="_manage_stock" value="1">
					<span class="checkbox-title"><?php esc_html_e( 'Manage stock?', 'woocommerce' ); ?></span>
				</label>
			</div>
		<?php endif; ?>

		<label class="stock_status_field">
			<span class="title"><?php esc_html_e( 'In stock?', 'woocommerce' ); ?></span>
			<span class="input-text-wrap">
				<select class="stock_status" name="_stock_status">
					<?php
					echo '<option value="" id="stock_status_no_change">' . esc_html__( '— No Change —', 'woocommerce' ) . '</option>';
					foreach ( wc_get_product_stock_status_options() as $key => $value ) {
						echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
					}
					?>
				</select>
				<div class="wc-quick-edit-warning" style="display:none">
					<?php echo esc_html__( 'This will change the stock status of all variations.', 'woocommerce' ); ?></p>
				</div>
			</span>
		</label>

		<div class="stock_fields">
			<?php if ( get_option( 'woocommerce_manage_stock' ) === 'yes' ) : ?>
				<label class="stock_qty_field">
					<span class="title"><?php esc_html_e( 'Stock qty', 'woocommerce' ); ?></span>
					<span class="input-text-wrap">
						<input type="number" name="_stock" class="text stock" step="any" value="">
					</span>
				</label>
			<?php endif; ?>
		</div>

		<label class="alignleft backorder_field">
			<span class="title"><?php esc_html_e( 'Backorders?', 'woocommerce' ); ?></span>
			<span class="input-text-wrap">
				<select class="backorders" name="_backorders">
					<?php
					foreach ( wc_get_product_backorder_options() as $key => $value ) {
						echo '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
					}
					?>
				</select>
			</span>
		</label>

		<?php do_action( 'woocommerce_product_quick_edit_end' ); ?>

		<input type="hidden" name="woocommerce_quick_edit" value="1" />
		<input type="hidden" name="woocommerce_quick_edit_nonce" value="<?php echo esc_attr( wp_create_nonce( 'woocommerce_quick_edit_nonce' ) ); ?>" />
	</div>
</fieldset>
html-report-by-date.php000064400000010143151551052230011053 0ustar00<?php
/**
 * Admin View: Report by Date (with date filters)
 *
 * @package WooCommerce\Admin\Reporting
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}
?>
<div id="poststuff" class="woocommerce-reports-wide">
	<div class="postbox">

	<?php if ( 'custom' === $current_range && isset( $_GET['start_date'], $_GET['end_date'] ) ) : ?>
		<h3 class="screen-reader-text">
			<?php
			/* translators: 1: start date 2: end date */
			printf(
				esc_html__( 'From %1$s to %2$s', 'woocommerce' ),
				esc_html( wc_clean( wp_unslash( $_GET['start_date'] ) ) ),
				esc_html( wc_clean( wp_unslash( $_GET['end_date'] ) ) )
			);
			?>
		</h3>
	<?php else : ?>
		<h3 class="screen-reader-text"><?php echo esc_html( $ranges[ $current_range ] ); ?></h3>
	<?php endif; ?>

		<div class="stats_range">
			<?php $this->get_export_button(); ?>
			<ul>
				<?php
				foreach ( $ranges as $range => $name ) {
					echo '<li class="' . ( $current_range == $range ? 'active' : '' ) . '"><a href="' . esc_url( remove_query_arg( array( 'start_date', 'end_date' ), add_query_arg( 'range', $range ) ) ) . '">' . esc_html( $name ) . '</a></li>';
				}
				?>
				<li class="custom <?php echo ( 'custom' === $current_range ) ? 'active' : ''; ?>">
					<?php esc_html_e( 'Custom:', 'woocommerce' ); ?>
					<form method="GET">
						<div>
							<?php
							// Maintain query string.
							foreach ( $_GET as $key => $value ) {
								if ( is_array( $value ) ) {
									foreach ( $value as $v ) {
										echo '<input type="hidden" name="' . esc_attr( sanitize_text_field( $key ) ) . '[]" value="' . esc_attr( sanitize_text_field( $v ) ) . '" />';
									}
								} else {
									echo '<input type="hidden" name="' . esc_attr( sanitize_text_field( $key ) ) . '" value="' . esc_attr( sanitize_text_field( $value ) ) . '" />';
								}
							}
							?>
							<input type="hidden" name="range" value="custom" />
							<input type="text" size="11" placeholder="yyyy-mm-dd" value="<?php echo ( ! empty( $_GET['start_date'] ) ) ? esc_attr( wp_unslash( $_GET['start_date'] ) ) : ''; ?>" name="start_date" class="range_datepicker from" autocomplete="off" /><?php //@codingStandardsIgnoreLine ?>
							<span>&ndash;</span>
							<input type="text" size="11" placeholder="yyyy-mm-dd" value="<?php echo ( ! empty( $_GET['end_date'] ) ) ? esc_attr( wp_unslash( $_GET['end_date'] ) ) : ''; ?>" name="end_date" class="range_datepicker to" autocomplete="off" /><?php //@codingStandardsIgnoreLine ?>
							<button type="submit" class="button" value="<?php esc_attr_e( 'Go', 'woocommerce' ); ?>"><?php esc_html_e( 'Go', 'woocommerce' ); ?></button>
							<?php wp_nonce_field( 'custom_range', 'wc_reports_nonce', false ); ?>
						</div>
					</form>
				</li>
			</ul>
		</div>
		<?php if ( empty( $hide_sidebar ) ) : ?>
			<div class="inside chart-with-sidebar">
				<div class="chart-sidebar">
					<?php if ( $legends = $this->get_chart_legend() ) : ?>
						<ul class="chart-legend">
							<?php foreach ( $legends as $legend ) : ?>
								<?php // @codingStandardsIgnoreStart ?>
								<li style="border-color: <?php echo $legend['color']; ?>" <?php if ( isset( $legend['highlight_series'] ) ) echo 'class="highlight_series ' . ( isset( $legend['placeholder'] ) ? 'tips' : '' ) . '" data-series="' . esc_attr( $legend['highlight_series'] ) . '"'; ?> data-tip="<?php echo isset( $legend['placeholder'] ) ? $legend['placeholder'] : ''; ?>">
									<?php echo $legend['title']; ?>
								</li>
								<?php // @codingStandardsIgnoreEnd ?>
							<?php endforeach; ?>
						</ul>
					<?php endif; ?>
					<ul class="chart-widgets">
						<?php foreach ( $this->get_chart_widgets() as $widget ) : ?>
							<li class="chart-widget">
								<?php if ( $widget['title'] ) : ?>
									<h4><?php echo esc_html( $widget['title'] ); ?></h4>
								<?php endif; ?>
								<?php call_user_func( $widget['callback'] ); ?>
							</li>
						<?php endforeach; ?>
					</ul>
				</div>
				<div class="main">
					<?php $this->get_main_chart(); ?>
				</div>
			</div>
		<?php else : ?>
			<div class="inside">
				<?php $this->get_main_chart(); ?>
			</div>
		<?php endif; ?>
	</div>
</div>
html-notice-untested-extensions-inline.php000064400000001410151552337130015003 0ustar00<?php
/**
 * Admin View: Notice - Untested extensions.
 *
 * @package WooCommerce\Admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div class="wc_plugin_upgrade_notice extensions_warning <?php echo esc_attr( $upgrade_type ); ?>">
	<p><?php echo wp_kses_post( $message ); ?></p>

	<table class="plugin-details-table" cellspacing="0">
		<thead>
			<tr>
				<th><?php esc_html_e( 'Plugin', 'woocommerce' ); ?></th>
				<th><?php esc_html_e( 'Tested up to WooCommerce version', 'woocommerce' ); ?></th>
			</tr>
		</thead>
		<tbody>
			<?php foreach ( $plugins as $plugin ) : ?>
				<tr>
					<td><?php echo esc_html( $plugin['Name'] ); ?></td>
					<td><?php echo esc_html( $plugin['WC tested up to'] ); ?></td>
				</tr>
			<?php endforeach ?>
		</tbody>
	</table>
</div>
html-notice-untested-extensions-modal.php000064400000003565151552337140014637 0ustar00<?php
/**
 * Admin View: Notice - Untested extensions.
 *
 * @package WooCommerce\Admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$untested_plugins_msg = sprintf(
	/* translators: %s: version number */
	__( 'The following active plugin(s) have not declared compatibility with WooCommerce %s yet and should be updated and examined further before you proceed:', 'woocommerce' ),
	$new_version
);

?>
<div id="wc_untested_extensions_modal">
	<div class="wc_untested_extensions_modal--content">
		<h1><?php esc_html_e( "Are you sure you're ready?", 'woocommerce' ); ?></h1>
		<div class="wc_plugin_upgrade_notice extensions_warning">
			<p><?php echo esc_html( $untested_plugins_msg ); ?></p>

			<div class="plugin-details-table-container">
				<table class="plugin-details-table" cellspacing="0">
					<thead>
						<tr>
							<th><?php esc_html_e( 'Plugin', 'woocommerce' ); ?></th>
							<th><?php esc_html_e( 'Tested up to WooCommerce version', 'woocommerce' ); ?></th>
						</tr>
					</thead>
					<tbody>
						<?php foreach ( $plugins as $plugin ) : ?>
							<tr>
								<td><?php echo esc_html( $plugin['Name'] ); ?></td>
								<td><?php echo esc_html( $plugin['WC tested up to'] ); ?></td>
							</tr>
						<?php endforeach ?>
					</tbody>
				</table>
			</div>

			<p><?php esc_html_e( 'We strongly recommend creating a backup of your site before updating.', 'woocommerce' ); ?> <a href="https://woocommerce.com/2017/05/create-use-backups-woocommerce/" target="_blank"><?php esc_html_e( 'Learn more', 'woocommerce' ); ?></a></p>

			<?php if ( current_user_can( 'update_plugins' ) ) : ?>
				<div class="actions">
					<a href="#" class="button button-secondary cancel"><?php esc_html_e( 'Cancel', 'woocommerce' ); ?></a>
					<a class="button button-primary accept" href="#"><?php esc_html_e( 'Update now', 'woocommerce' ); ?></a>
				</div>
			<?php endif ?>
		</div>
	</div>
</div>
class-wc-settings-rest-api.php000064400000000377151552503300012357 0ustar00<?php // @codingStandardsIgnoreFile.
/**
 * Settings class file.
 *
 * @deprecated 3.4.0 Replaced with class-wc-settings-advanced.php.
 * @todo remove in 4.0.
 */

defined( 'ABSPATH' ) || exit;

return include __DIR__ . '/class-wc-settings-advanced.php';
html-admin-page-shipping-classes.php000064400000007000151552503300013467 0ustar00<?php
/**
 * Shipping classes admin
 *
 * @package WooCommerce\Admin\Shipping
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>

<h2>
	<?php esc_html_e( 'Shipping classes', 'woocommerce' ); ?>
	<?php echo wc_help_tip( __( 'Shipping classes can be used to group products of similar type and can be used by some Shipping Methods (such as "Flat rate shipping") to provide different rates to different classes of product.', 'woocommerce' ) ); // @codingStandardsIgnoreLine ?>
</h2>

<table class="wc-shipping-classes widefat">
	<thead>
		<tr>
			<?php foreach ( $shipping_class_columns as $class => $heading ) : ?>
				<th class="<?php echo esc_attr( $class ); ?>"><?php echo esc_html( $heading ); ?></th>
			<?php endforeach; ?>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<td colspan="<?php echo absint( count( $shipping_class_columns ) ); ?>">
				<button type="submit" name="save" class="button button-primary wc-shipping-class-save" value="<?php esc_attr_e( 'Save shipping classes', 'woocommerce' ); ?>" disabled><?php esc_html_e( 'Save shipping classes', 'woocommerce' ); ?></button>
				<a class="button button-secondary wc-shipping-class-add" href="#"><?php esc_html_e( 'Add shipping class', 'woocommerce' ); ?></a>
			</td>
		</tr>
	</tfoot>
	<tbody class="wc-shipping-class-rows"></tbody>
</table>

<script type="text/html" id="tmpl-wc-shipping-class-row-blank">
	<tr>
		<td class="wc-shipping-classes-blank-state" colspan="<?php echo absint( count( $shipping_class_columns ) ); ?>"><p><?php esc_html_e( 'No shipping classes have been created.', 'woocommerce' ); ?></p></td>
	</tr>
</script>

<script type="text/html" id="tmpl-wc-shipping-class-row">
	<tr data-id="{{ data.term_id }}">
		<?php
		foreach ( $shipping_class_columns as $class => $heading ) {
			echo '<td class="' . esc_attr( $class ) . '">';
			switch ( $class ) {
				case 'wc-shipping-class-name':
					?>
					<div class="view">
						{{ data.name }}
						<div class="row-actions">
							<a class="wc-shipping-class-edit" href="#"><?php esc_html_e( 'Edit', 'woocommerce' ); ?></a> | <a href="#" class="wc-shipping-class-delete"><?php esc_html_e( 'Remove', 'woocommerce' ); ?></a>
						</div>
					</div>
					<div class="edit">
						<input type="text" name="name[{{ data.term_id }}]" data-attribute="name" value="{{ data.name }}" placeholder="<?php esc_attr_e( 'Shipping class name', 'woocommerce' ); ?>" />
						<div class="row-actions">
							<a class="wc-shipping-class-cancel-edit" href="#"><?php esc_html_e( 'Cancel changes', 'woocommerce' ); ?></a>
						</div>
					</div>
					<?php
					break;
				case 'wc-shipping-class-slug':
					?>
					<div class="view">{{ data.slug }}</div>
					<div class="edit"><input type="text" name="slug[{{ data.term_id }}]" data-attribute="slug" value="{{ data.slug }}" placeholder="<?php esc_attr_e( 'Slug', 'woocommerce' ); ?>" /></div>
					<?php
					break;
				case 'wc-shipping-class-description':
					?>
					<div class="view">{{ data.description }}</div>
					<div class="edit"><input type="text" name="description[{{ data.term_id }}]" data-attribute="description" value="{{ data.description }}" placeholder="<?php esc_attr_e( 'Description for your reference', 'woocommerce' ); ?>" /></div>
					<?php
					break;
				case 'wc-shipping-class-count':
					?>
					<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=product&product_shipping_class=' ) ); ?>{{data.slug}}">{{ data.count }}</a>
					<?php
					break;
				default:
					do_action( 'woocommerce_shipping_classes_column_' . $class );
					break;
			}
			echo '</td>';
		}
		?>
	</tr>
</script>
html-admin-page-shipping-zone-methods.php000064400000023226151552503300014456 0ustar00<?php
/**
 * Shipping zone admin
 *
 * @package WooCommerce\Admin\Shipping
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>

<h2>
	<a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=shipping' ) ); ?>"><?php esc_html_e( 'Shipping zones', 'woocommerce' ); ?></a> &gt;
	<span class="wc-shipping-zone-name"><?php echo esc_html( $zone->get_zone_name() ? $zone->get_zone_name() : __( 'Zone', 'woocommerce' ) ); ?></span>
</h2>

<?php do_action( 'woocommerce_shipping_zone_before_methods_table', $zone ); ?>

<table class="form-table wc-shipping-zone-settings">
	<tbody>
		<?php if ( 0 !== $zone->get_id() ) : ?>
			<tr valign="top" class="">
				<th scope="row" class="titledesc">
					<label for="zone_name">
						<?php esc_html_e( 'Zone name', 'woocommerce' ); ?>
						<?php echo wc_help_tip( __( 'This is the name of the zone for your reference.', 'woocommerce' ) ); // @codingStandardsIgnoreLine ?>
					</label>
				</th>
				<td class="forminp">
					<input type="text" data-attribute="zone_name" name="zone_name" id="zone_name" value="<?php echo esc_attr( $zone->get_zone_name( 'edit' ) ); ?>" placeholder="<?php esc_attr_e( 'Zone name', 'woocommerce' ); ?>">
				</td>
			</tr>
			<tr valign="top" class="">
				<th scope="row" class="titledesc">
					<label for="zone_locations">
						<?php esc_html_e( 'Zone regions', 'woocommerce' ); ?>
						<?php echo wc_help_tip( __( 'These are regions inside this zone. Customers will be matched against these regions.', 'woocommerce' ) ); // @codingStandardsIgnoreLine ?>
					</label>
				</th>
				<td class="forminp">
					<select multiple="multiple" data-attribute="zone_locations" id="zone_locations" name="zone_locations" data-placeholder="<?php esc_attr_e( 'Select regions within this zone', 'woocommerce' ); ?>" class="wc-shipping-zone-region-select chosen_select">
						<?php
						foreach ( $shipping_continents as $continent_code => $continent ) {
							echo '<option value="continent:' . esc_attr( $continent_code ) . '"' . wc_selected( "continent:$continent_code", $locations ) . '>' . esc_html( $continent['name'] ) . '</option>';

							$countries = array_intersect( array_keys( $allowed_countries ), $continent['countries'] );

							foreach ( $countries as $country_code ) {
								echo '<option value="country:' . esc_attr( $country_code ) . '"' . wc_selected( "country:$country_code", $locations ) . '>' . esc_html( '&nbsp;&nbsp; ' . $allowed_countries[ $country_code ] ) . '</option>';

								$states = WC()->countries->get_states( $country_code );

								if ( $states ) {
									foreach ( $states as $state_code => $state_name ) {
										echo '<option value="state:' . esc_attr( $country_code . ':' . $state_code ) . '"' . wc_selected( "state:$country_code:$state_code", $locations ) . '>' . esc_html( '&nbsp;&nbsp;&nbsp;&nbsp; ' . $state_name . ', ' . $allowed_countries[ $country_code ] ) . '</option>';
									}
								}
							}
						}
						?>
					</select>
					<?php if ( empty( $postcodes ) ) : ?>
						<a class="wc-shipping-zone-postcodes-toggle" href="#"><?php esc_html_e( 'Limit to specific ZIP/postcodes', 'woocommerce' ); ?></a>
					<?php endif; ?>
					<div class="wc-shipping-zone-postcodes">
						<textarea name="zone_postcodes" data-attribute="zone_postcodes" id="zone_postcodes" placeholder="<?php esc_attr_e( 'List 1 postcode per line', 'woocommerce' ); ?>" class="input-text large-text" cols="25" rows="5"><?php echo esc_textarea( implode( "\n", $postcodes ) ); ?></textarea>
						<?php /* translators: WooCommerce link to setting up shipping zones */ ?>
						<span class="description"><?php printf( __( 'Postcodes containing wildcards (e.g. CB23*) or fully numeric ranges (e.g. <code>90210...99000</code>) are also supported. Please see the shipping zones <a href="%s" target="_blank">documentation</a> for more information.', 'woocommerce' ), 'https://docs.woocommerce.com/document/setting-up-shipping-zones/#section-3' ); ?></span><?php // @codingStandardsIgnoreLine. ?>
					</div>
				</td>
			<?php endif; ?>
		</tr>
		<tr valign="top" class="">
			<th scope="row" class="titledesc">
				<label>
					<?php esc_html_e( 'Shipping methods', 'woocommerce' ); ?>
					<?php echo wc_help_tip( __( 'The following shipping methods apply to customers with shipping addresses within this zone.', 'woocommerce' ) ); // @codingStandardsIgnoreLine ?>
				</label>
			</th>
			<td class="">
				<table class="wc-shipping-zone-methods widefat">
					<thead>
						<tr>
							<th class="wc-shipping-zone-method-sort"></th>
							<th class="wc-shipping-zone-method-title"><?php esc_html_e( 'Title', 'woocommerce' ); ?></th>
							<th class="wc-shipping-zone-method-enabled"><?php esc_html_e( 'Enabled', 'woocommerce' ); ?></th>
							<th class="wc-shipping-zone-method-description"><?php esc_html_e( 'Description', 'woocommerce' ); ?></th>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="4">
								<button type="submit" class="button wc-shipping-zone-add-method" value="<?php esc_attr_e( 'Add shipping method', 'woocommerce' ); ?>"><?php esc_html_e( 'Add shipping method', 'woocommerce' ); ?></button>
							</td>
						</tr>
					</tfoot>
					<tbody class="wc-shipping-zone-method-rows"></tbody>
				</table>
			</td>
		</tr>
	</tbody>
</table>

<?php do_action( 'woocommerce_shipping_zone_after_methods_table', $zone ); ?>

<p class="submit">
	<button type="submit" name="submit" id="submit" class="button button-primary button-large wc-shipping-zone-method-save" value="<?php esc_attr_e( 'Save changes', 'woocommerce' ); ?>" disabled><?php esc_html_e( 'Save changes', 'woocommerce' ); ?></button>
</p>

<script type="text/html" id="tmpl-wc-shipping-zone-method-row-blank">
	<tr>
		<td class="wc-shipping-zone-method-blank-state" colspan="4">
			<p><?php esc_html_e( 'You can add multiple shipping methods within this zone. Only customers within the zone will see them.', 'woocommerce' ); ?></p>
		</td>
	</tr>
</script>

<script type="text/html" id="tmpl-wc-shipping-zone-method-row">
	<tr data-id="{{ data.instance_id }}" data-enabled="{{ data.enabled }}">
		<td width="1%" class="wc-shipping-zone-method-sort"></td>
		<td class="wc-shipping-zone-method-title">
			<a class="wc-shipping-zone-method-settings" href="admin.php?page=wc-settings&amp;tab=shipping&amp;instance_id={{ data.instance_id }}">{{{ data.title }}}</a>
			<div class="row-actions">
				<a class="wc-shipping-zone-method-settings" href="admin.php?page=wc-settings&amp;tab=shipping&amp;instance_id={{ data.instance_id }}"><?php esc_html_e( 'Edit', 'woocommerce' ); ?></a> | <a href="#" class="wc-shipping-zone-method-delete"><?php esc_html_e( 'Delete', 'woocommerce' ); ?></a>
			</div>
		</td>
		<td width="1%" class="wc-shipping-zone-method-enabled"><a href="#">{{{ data.enabled_icon }}}</a></td>
		<td class="wc-shipping-zone-method-description">
			<strong class="wc-shipping-zone-method-type">{{ data.method_title }}</strong>
			{{{ data.method_description }}}
		</td>
	</tr>
</script>

<script type="text/template" id="tmpl-wc-modal-shipping-method-settings">
	<div class="wc-backbone-modal wc-backbone-modal-shipping-method-settings">
		<div class="wc-backbone-modal-content">
			<section class="wc-backbone-modal-main" role="main">
				<header class="wc-backbone-modal-header">
					<h1>
						<?php
						printf(
							/* translators: %s: shipping method title */
							esc_html__( '%s Settings', 'woocommerce' ),
							'{{{ data.method.method_title }}}'
						);
						?>
					</h1>
					<button class="modal-close modal-close-link dashicons dashicons-no-alt">
						<span class="screen-reader-text"><?php esc_html_e( 'Close modal panel', 'woocommerce' ); ?></span>
					</button>
				</header>
				<article class="wc-modal-shipping-method-settings">
					<form action="" method="post">
						{{{ data.method.settings_html }}}
						<input type="hidden" name="instance_id" value="{{{ data.instance_id }}}" />
					</form>
				</article>
				<footer>
					<div class="inner">
						<button id="btn-ok" class="button button-primary button-large"><?php esc_html_e( 'Save changes', 'woocommerce' ); ?></button>
					</div>
				</footer>
			</section>
		</div>
	</div>
	<div class="wc-backbone-modal-backdrop modal-close"></div>
</script>

<script type="text/template" id="tmpl-wc-modal-add-shipping-method">
	<div class="wc-backbone-modal">
		<div class="wc-backbone-modal-content">
			<section class="wc-backbone-modal-main" role="main">
				<header class="wc-backbone-modal-header">
					<h1><?php esc_html_e( 'Add shipping method', 'woocommerce' ); ?></h1>
					<button class="modal-close modal-close-link dashicons dashicons-no-alt">
						<span class="screen-reader-text"><?php esc_html_e( 'Close modal panel', 'woocommerce' ); ?></span>
					</button>
				</header>
				<article>
					<form action="" method="post">
						<div class="wc-shipping-zone-method-selector">
							<p><?php esc_html_e( 'Choose the shipping method you wish to add. Only shipping methods which support zones are listed.', 'woocommerce' ); ?></p>

							<select name="add_method_id">
								<?php
								foreach ( WC()->shipping()->load_shipping_methods() as $method ) {
									if ( ! $method->supports( 'shipping-zones' ) ) {
										continue;
									}
									echo '<option data-description="' . esc_attr( wp_kses_post( wpautop( $method->get_method_description() ) ) ) . '" value="' . esc_attr( $method->id ) . '">' . esc_html( $method->get_method_title() ) . '</li>';
								}
								?>
							</select>
						</div>
					</form>
				</article>
				<footer>
					<div class="inner">
						<button id="btn-ok" class="button button-primary button-large"><?php esc_html_e( 'Add shipping method', 'woocommerce' ); ?></button>
					</div>
				</footer>
			</section>
		</div>
	</div>
	<div class="wc-backbone-modal-backdrop modal-close"></div>
</script>
html-admin-page-shipping-zones-instance.php000064400000000746151552503300015004 0ustar00<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<h2>
	<a href="<?php echo admin_url( 'admin.php?page=wc-settings&tab=shipping' ); ?>"><?php _e( 'Shipping zones', 'woocommerce' ); ?></a> &gt;
	<a href="<?php echo admin_url( 'admin.php?page=wc-settings&tab=shipping&zone_id=' . absint( $zone->get_id() ) ); ?>"><?php echo esc_html( $zone->get_zone_name() ); ?></a> &gt;
	<?php echo esc_html( $shipping_method->get_method_title() ); ?>
</h2>

<?php $shipping_method->admin_options(); ?>
html-admin-page-shipping-zones.php000064400000014071151552503300013176 0ustar00<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>

<h2 class="wc-shipping-zones-heading">
	<?php _e( 'Shipping zones', 'woocommerce' ); ?>
	<a href="<?php echo admin_url( 'admin.php?page=wc-settings&tab=shipping&zone_id=new' ); ?>" class="page-title-action"><?php esc_html_e( 'Add shipping zone', 'woocommerce' ); ?></a>
</h2>
<p><?php echo __( 'A shipping zone is a geographic region where a certain set of shipping methods are offered.', 'woocommerce' ) . ' ' . __( 'WooCommerce will match a customer to a single zone using their shipping address and present the shipping methods within that zone to them.', 'woocommerce' ); ?></p>
<table class="wc-shipping-zones widefat">
	<thead>
		<tr>
			<th class="wc-shipping-zone-sort"><?php echo wc_help_tip( __( 'Drag and drop to re-order your custom zones. This is the order in which they will be matched against the customer address.', 'woocommerce' ) ); ?></th>
			<th class="wc-shipping-zone-name"><?php esc_html_e( 'Zone name', 'woocommerce' ); ?></th>
			<th class="wc-shipping-zone-region"><?php esc_html_e( 'Region(s)', 'woocommerce' ); ?></th>
			<th class="wc-shipping-zone-methods"><?php esc_html_e( 'Shipping method(s)', 'woocommerce' ); ?></th>
		</tr>
	</thead>
	<tbody class="wc-shipping-zone-rows"></tbody>
	<tbody>
		<tr data-id="0" class="wc-shipping-zone-worldwide">
			<td width="1%" class="wc-shipping-zone-worldwide"></td>
			<td class="wc-shipping-zone-name">
				<a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=shipping&zone_id=0' ) ); ?>"><?php esc_html_e( 'Locations not covered by your other zones', 'woocommerce' ); ?></a>
				<div class="row-actions">
					<a href="admin.php?page=wc-settings&amp;tab=shipping&amp;zone_id=0"><?php _e( 'Manage shipping methods', 'woocommerce' ); ?></a>
				</div>
			</td>
			<td class="wc-shipping-zone-region"><?php _e( 'This zone is <b>optionally</b> used for regions that are not included in any other shipping zone.', 'woocommerce' ); ?></td>
			<td class="wc-shipping-zone-methods">
				<ul>
					<?php
					$worldwide = new WC_Shipping_Zone( 0 );
					$methods   = $worldwide->get_shipping_methods();
					uasort( $methods, 'wc_shipping_zone_method_order_uasort_comparison' );

					if ( ! empty( $methods ) ) {
						foreach ( $methods as $method ) {
							$class_name = 'yes' === $method->enabled ? 'method_enabled' : 'method_disabled';
							echo '<li class="wc-shipping-zone-method ' . esc_attr( $class_name ) . '">' . esc_html( $method->get_title() ) . '</li>';
						}
					} else {
						echo '<li class="wc-shipping-zone-method">' . __( 'No shipping methods offered to this zone.', 'woocommerce' ) . '</li>';
					}
					?>
				</ul>
			</td>
		</tr>
	</tbody>
</table>

<script type="text/html" id="tmpl-wc-shipping-zone-row-blank">
	<?php if ( 0 === $method_count ) : ?>
		<tr>
			<td class="wc-shipping-zones-blank-state" colspan="4">
				<p class="main"><?php _e( 'A shipping zone is a geographic region where a certain set of shipping methods and rates apply.', 'woocommerce' ); ?></p>
				<p><?php _e( 'For example:', 'woocommerce' ); ?></p>
				<ul>
					<li><?php _e( 'Local zone = California ZIP 90210 = Local pickup', 'woocommerce' ); ?>
					<li><?php _e( 'US domestic zone = All US states = Flat rate shipping', 'woocommerce' ); ?>
					<li><?php _e( 'Europe zone = Any country in Europe = Flat rate shipping', 'woocommerce' ); ?>
				</ul>
				<p><?php _e( 'Add as many zones as you need &ndash; customers will only see the methods available for their address.', 'woocommerce' ); ?></p>
				<a class="button button-primary wc-shipping-zone-add" href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=shipping&zone_id=new' ) ); ?>"><?php _e( 'Add shipping zone', 'woocommerce' ); ?></a>
			</td>
		</tr>
	<?php endif; ?>
</script>

<script type="text/html" id="tmpl-wc-shipping-zone-row">
	<tr data-id="{{ data.zone_id }}">
		<td width="1%" class="wc-shipping-zone-sort"></td>
		<td class="wc-shipping-zone-name">
			<a href="admin.php?page=wc-settings&amp;tab=shipping&amp;zone_id={{ data.zone_id }}">{{ data.zone_name }}</a>
			<div class="row-actions">
				<a href="admin.php?page=wc-settings&amp;tab=shipping&amp;zone_id={{ data.zone_id }}"><?php _e( 'Edit', 'woocommerce' ); ?></a> | <a href="#" class="wc-shipping-zone-delete"><?php _e( 'Delete', 'woocommerce' ); ?></a>
			</div>
		</td>
		<td class="wc-shipping-zone-region">
			{{ data.formatted_zone_location }}
		</td>
		<td class="wc-shipping-zone-methods">
			<div><ul></ul></div>
		</td>
	</tr>
</script>

<script type="text/template" id="tmpl-wc-modal-add-shipping-method">
	<div class="wc-backbone-modal">
		<div class="wc-backbone-modal-content">
			<section class="wc-backbone-modal-main" role="main">
				<header class="wc-backbone-modal-header">
					<h1><?php _e( 'Add shipping method', 'woocommerce' ); ?></h1>
					<button class="modal-close modal-close-link dashicons dashicons-no-alt">
						<span class="screen-reader-text"><?php _e( 'Close modal panel', 'woocommerce' ); ?></span>
					</button>
				</header>
				<article>
					<form action="" method="post">
						<div class="wc-shipping-zone-method-selector">
							<p><?php esc_html_e( 'Choose the shipping method you wish to add. Only shipping methods which support zones are listed.', 'woocommerce' ); ?></p>

							<select name="add_method_id">
								<?php
								foreach ( WC()->shipping()->load_shipping_methods() as $method ) {
									if ( ! $method->supports( 'shipping-zones' ) ) {
										continue;
									}
									echo '<option data-description="' . esc_attr( wp_kses_post( wpautop( $method->get_method_description() ) ) ) . '" value="' . esc_attr( $method->id ) . '">' . esc_html( $method->get_method_title() ) . '</li>';
								}
								?>
							</select>
							<input type="hidden" name="zone_id" value="{{{ data.zone_id }}}" />
						</div>
					</form>
				</article>
				<footer>
					<div class="inner">
						<button id="btn-ok" class="button button-primary button-large"><?php _e( 'Add shipping method', 'woocommerce' ); ?></button>
					</div>
				</footer>
			</section>
		</div>
	</div>
	<div class="wc-backbone-modal-backdrop modal-close"></div>
</script>
html-keys-edit.php000064400000013461151552503300010121 0ustar00<?php
/**
 * Admin view: Edit API keys
 *
 * @package WooCommerce\Admin\Settings
 */

defined( 'ABSPATH' ) || exit;
?>

<div id="key-fields" class="settings-panel">
	<h2><?php esc_html_e( 'Key details', 'woocommerce' ); ?></h2>

	<input type="hidden" id="key_id" value="<?php echo esc_attr( $key_id ); ?>" />

	<table id="api-keys-options" class="form-table">
		<tbody>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<label for="key_description">
						<?php esc_html_e( 'Description', 'woocommerce' ); ?>
						<?php echo wc_help_tip( __( 'Friendly name for identifying this key.', 'woocommerce' ) ); ?>
					</label>
				</th>
				<td class="forminp">
					<input maxlength="200" id="key_description" type="text" class="input-text regular-input" value="<?php echo esc_attr( $key_data['description'] ); ?>" />
				</td>
			</tr>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<label for="key_user">
						<?php esc_html_e( 'User', 'woocommerce' ); ?>
						<?php echo wc_help_tip( __( 'Owner of these keys.', 'woocommerce' ) ); ?>
					</label>
				</th>
				<td class="forminp">
					<?php
					$current_user_id = get_current_user_id();
					$user_id        = ! empty( $key_data['user_id'] ) ? absint( $key_data['user_id'] ) : $current_user_id;
					$user           = get_user_by( 'id', $user_id );
					$user_string    = sprintf(
						/* translators: 1: user display name 2: user ID 3: user email */
						esc_html__( '%1$s (#%2$s &ndash; %3$s)', 'woocommerce' ),
						$user->display_name,
						absint( $user->ID ),
						$user->user_email
					);
					?>
					<select class="wc-customer-search" id="key_user" data-placeholder="<?php esc_attr_e( 'Search for a user&hellip;', 'woocommerce' ); ?>" data-allow_clear="true">
						<option value="<?php echo esc_attr( $user_id ); ?>" selected="selected"><?php echo htmlspecialchars( wp_kses_post( $user_string ) ); // htmlspecialchars to prevent XSS when rendered by selectWoo. ?></option>
					</select>
				</td>
			</tr>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<label for="key_permissions">
						<?php esc_html_e( 'Permissions', 'woocommerce' ); ?>
						<?php echo wc_help_tip( __( 'Select the access type of these keys.', 'woocommerce' ) ); ?>
					</label>
				</th>
				<td class="forminp">
					<select id="key_permissions" class="wc-enhanced-select">
						<?php
						$permissions = array(
							'read'       => __( 'Read', 'woocommerce' ),
							'write'      => __( 'Write', 'woocommerce' ),
							'read_write' => __( 'Read/Write', 'woocommerce' ),
						);

						foreach ( $permissions as $permission_id => $permission_name ) :
							?>
							<option value="<?php echo esc_attr( $permission_id ); ?>" <?php selected( $key_data['permissions'], $permission_id, true ); ?>><?php echo esc_html( $permission_name ); ?></option>
						<?php endforeach; ?>
					</select>
				</td>
			</tr>

			<?php if ( 0 !== $key_id ) : ?>
				<tr valign="top">
					<th scope="row" class="titledesc">
						<?php esc_html_e( 'Consumer key ending in', 'woocommerce' ); ?>
					</th>
					<td class="forminp">
						<code>&hellip;<?php echo esc_html( $key_data['truncated_key'] ); ?></code>
					</td>
				</tr>
				<tr valign="top">
					<th scope="row" class="titledesc">
						<?php esc_html_e( 'Last access', 'woocommerce' ); ?>
					</th>
					<td class="forminp">
						<span>
						<?php
						if ( ! empty( $key_data['last_access'] ) ) {
							/* translators: 1: last access date 2: last access time */
							$date = sprintf( __( '%1$s at %2$s', 'woocommerce' ), date_i18n( wc_date_format(), strtotime( $key_data['last_access'] ) ), date_i18n( wc_time_format(), strtotime( $key_data['last_access'] ) ) );

							echo esc_html( apply_filters( 'woocommerce_api_key_last_access_datetime', $date, $key_data['last_access'] ) );
						} else {
							esc_html_e( 'Unknown', 'woocommerce' );
						}
						?>
						</span>
					</td>
				</tr>
			<?php endif ?>
		</tbody>
	</table>

	<?php do_action( 'woocommerce_admin_key_fields', $key_data ); ?>

	<?php
	if ( 0 === intval( $key_id ) ) {
		submit_button( __( 'Generate API key', 'woocommerce' ), 'primary', 'update_api_key' );
	} else {
		?>
		<p class="submit">
			<?php submit_button( __( 'Save changes', 'woocommerce' ), 'primary', 'update_api_key', false ); ?>
			<a style="color: #a00; text-decoration: none; margin-left: 10px;" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'revoke-key' => $key_id ), admin_url( 'admin.php?page=wc-settings&tab=advanced&section=keys' ) ), 'revoke' ) ); ?>"><?php esc_html_e( 'Revoke key', 'woocommerce' ); ?></a>
		</p>
		<?php
	}
	?>
</div>

<script type="text/template" id="tmpl-api-keys-template">
	<p id="copy-error"></p>
	<table class="form-table">
		<tbody>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<?php esc_html_e( 'Consumer key', 'woocommerce' ); ?>
				</th>
				<td class="forminp">
					<input id="key_consumer_key" type="text" value="{{ data.consumer_key }}" size="55" readonly="readonly"> <button type="button" class="button-secondary copy-key" data-tip="<?php esc_attr_e( 'Copied!', 'woocommerce' ); ?>"><?php esc_html_e( 'Copy', 'woocommerce' ); ?></button>
				</td>
			</tr>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<?php esc_html_e( 'Consumer secret', 'woocommerce' ); ?>
				</th>
				<td class="forminp">
					<input id="key_consumer_secret" type="text" value="{{ data.consumer_secret }}" size="55" readonly="readonly"> <button type="button" class="button-secondary copy-secret" data-tip="<?php esc_attr_e( 'Copied!', 'woocommerce' ); ?>"><?php esc_html_e( 'Copy', 'woocommerce' ); ?></button>
				</td>
			</tr>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<?php esc_html_e( 'QRCode', 'woocommerce' ); ?>
				</th>
				<td class="forminp">
					<div id="keys-qrcode"></div>
				</td>
			</tr>
		</tbody>
	</table>
</script>
html-settings-tax.php000064400000017245151552503300010661 0ustar00<?php
/**
 * Admin view: Settings tax
 *
 * @package WooCommerce\Admin\Settings
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>

<div class="wc-tax-rates-search" id="rates-search">
	<input type="search" class="wc-tax-rates-search-field" placeholder="<?php esc_attr_e( 'Search&hellip;', 'woocommerce' ); ?>" value="<?php echo isset( $_GET['s'] ) ? esc_attr( $_GET['s'] ) : ''; ?>" />
</div>

<div id="rates-pagination"></div>

<h3>
	<?php
	/* translators: %s: tax rate */
	printf(
		__( '"%s" tax rates', 'woocommerce' ),
		$current_class ? esc_html( $current_class ) : __( 'Standard', 'woocommerce' )
	);
	?>
</h3>

<table class="wc_tax_rates wc_input_table widefat">
	<thead>
		<tr>
			<th width="8%"><a href="https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes" target="_blank"><?php _e( 'Country&nbsp;code', 'woocommerce' ); ?></a>&nbsp;<?php echo wc_help_tip( __( 'A 2 digit country code, e.g. US. Leave blank to apply to all.', 'woocommerce' ) ); ?></th>
			<th width="8%"><?php _e( 'State code', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'A 2 digit state code, e.g. AL. Leave blank to apply to all.', 'woocommerce' ) ); ?></th>
			<th><?php _e( 'Postcode / ZIP', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Postcode for this rule. Semi-colon (;) separate multiple values. Leave blank to apply to all areas. Wildcards (*) and ranges for numeric postcodes (e.g. 12345...12350) can also be used.', 'woocommerce' ) ); ?></th>
			<th><?php _e( 'City', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Cities for this rule. Semi-colon (;) separate multiple values. Leave blank to apply to all cities.', 'woocommerce' ) ); ?></th>
			<th width="8%"><?php _e( 'Rate&nbsp;%', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Enter a tax rate (percentage) to 4 decimal places.', 'woocommerce' ) ); ?></th>
			<th width="8%"><?php _e( 'Tax name', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Enter a name for this tax rate.', 'woocommerce' ) ); ?></th>
			<th width="8%"><?php _e( 'Priority', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Choose a priority for this tax rate. Only 1 matching rate per priority will be used. To define multiple tax rates for a single area you need to specify a different priority per rate.', 'woocommerce' ) ); ?></th>
			<th width="8%"><?php _e( 'Compound', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Choose whether or not this is a compound rate. Compound tax rates are applied on top of other tax rates.', 'woocommerce' ) ); ?></th>
			<th width="8%"><?php _e( 'Shipping', 'woocommerce' ); ?>&nbsp;<?php echo wc_help_tip( __( 'Choose whether or not this tax rate also gets applied to shipping.', 'woocommerce' ) ); ?></th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<th colspan="9">
				<a href="#" class="button plus insert"><?php _e( 'Insert row', 'woocommerce' ); ?></a>
				<a href="#" class="button minus remove_tax_rates"><?php _e( 'Remove selected row(s)', 'woocommerce' ); ?></a>
				<a href="#" download="tax_rates.csv" class="button export"><?php _e( 'Export CSV', 'woocommerce' ); ?></a>
				<a href="<?php echo admin_url( 'admin.php?import=woocommerce_tax_rate_csv' ); ?>" class="button import"><?php _e( 'Import CSV', 'woocommerce' ); ?></a>
			</th>
		</tr>
	</tfoot>
	<tbody id="rates">
		<tr>
			<th colspan="9" style="text-align: center;"><?php esc_html_e( 'Loading&hellip;', 'woocommerce' ); ?></th>
		</tr>
	</tbody>
</table>

<div id="rates-bottom-pagination"></div>

<script type="text/html" id="tmpl-wc-tax-table-row">
	<tr class="tips" data-tip="<?php printf( esc_attr__( 'Tax rate ID: %s', 'woocommerce' ), '{{ data.tax_rate_id }}' ); ?>" data-id="{{ data.tax_rate_id }}">
		<td class="country">
			<input type="text" value="{{ data.tax_rate_country }}" placeholder="*" name="tax_rate_country[{{ data.tax_rate_id }}]" class="wc_input_country_iso" data-attribute="tax_rate_country" style="text-transform:uppercase" />
		</td>

		<td class="state">
			<input type="text" value="{{ data.tax_rate_state }}" placeholder="*" name="tax_rate_state[{{ data.tax_rate_id }}]" data-attribute="tax_rate_state" />
		</td>

		<td class="postcode">
			<input type="text" value="<# if ( data.postcode ) print( _.escape( data.postcode.join( '; ' ) ) ); #>" placeholder="*" data-name="tax_rate_postcode[{{ data.tax_rate_id }}]" data-attribute="postcode" />
		</td>

		<td class="city">
			<input type="text" value="<# if ( data.city ) print( _.escape( data.city.join( '; ' ) ) ); #>" placeholder="*" data-name="tax_rate_city[{{ data.tax_rate_id }}]" data-attribute="city" />
		</td>

		<td class="rate">
			<input type="text" value="{{ data.tax_rate }}" placeholder="0" name="tax_rate[{{ data.tax_rate_id }}]" data-attribute="tax_rate" />
		</td>

		<td class="name">
			<input type="text" value="{{ data.tax_rate_name }}" name="tax_rate_name[{{ data.tax_rate_id }}]" data-attribute="tax_rate_name" />
		</td>

		<td class="priority">
			<input type="number" step="1" min="1" value="{{ data.tax_rate_priority }}" name="tax_rate_priority[{{ data.tax_rate_id }}]" data-attribute="tax_rate_priority" />
		</td>

		<td class="compound">
			<input type="checkbox" class="checkbox" name="tax_rate_compound[{{ data.tax_rate_id }}]" <# if ( parseInt( data.tax_rate_compound, 10 ) ) { #> checked="checked" <# } #> data-attribute="tax_rate_compound" />
		</td>

		<td class="apply_to_shipping">
			<input type="checkbox" class="checkbox" name="tax_rate_shipping[{{ data.tax_rate_id }}]" <# if ( parseInt( data.tax_rate_shipping, 10 ) ) { #> checked="checked" <# } #> data-attribute="tax_rate_shipping" />
		</td>
	</tr>
</script>

<script type="text/html" id="tmpl-wc-tax-table-row-empty">
	<tr>
		<th colspan="9" style="text-align:center"><?php esc_html_e( 'No matching tax rates found.', 'woocommerce' ); ?></th>
	</tr>
</script>

<script type="text/html" id="tmpl-wc-tax-table-pagination">
	<div class="tablenav">
		<div class="tablenav-pages">
			<span class="displaying-num">
				<?php
				/* translators: %s: number */
				printf(
					__( '%s items', 'woocommerce' ), // %s will be a number eventually, but must be a string for now.
					'{{ data.qty_rates }}'
				);
				?>
			</span>
			<span class="pagination-links">

				<a class="tablenav-pages-navspan" data-goto="1">
					<span class="screen-reader-text"><?php esc_html_e( 'First page', 'woocommerce' ); ?></span>
					<span aria-hidden="true">&laquo;</span>
				</a>
				<a class="tablenav-pages-navspan" data-goto="<# print( Math.max( 1, parseInt( data.current_page, 10 ) - 1 ) ) #>">
					<span class="screen-reader-text"><?php esc_html_e( 'Previous page', 'woocommerce' ); ?></span>
					<span aria-hidden="true">&lsaquo;</span>
				</a>

				<span class="paging-input">
					<label for="current-page-selector" class="screen-reader-text"><?php esc_html_e( 'Current page', 'woocommerce' ); ?></label>
					<?php
						/* translators: 1: current page 2: total pages */
						printf(
							esc_html_x( '%1$s of %2$s', 'Pagination', 'woocommerce' ),
							'<input class="current-page" id="current-page-selector" type="text" name="paged" value="{{ data.current_page }}" size="<# print( data.qty_pages.toString().length ) #>" aria-describedby="table-paging">',
							'<span class="total-pages">{{ data.qty_pages }}</span>'
						);
					?>
				</span>

				<a class="tablenav-pages-navspan" data-goto="<# print( Math.min( data.qty_pages, parseInt( data.current_page, 10 ) + 1 ) ) #>">
					<span class="screen-reader-text"><?php esc_html_e( 'Next page', 'woocommerce' ); ?></span>
					<span aria-hidden="true">&rsaquo;</span>
				</a>
				<a class="tablenav-pages-navspan" data-goto="{{ data.qty_pages }}">
					<span class="screen-reader-text"><?php esc_html_e( 'Last page', 'woocommerce' ); ?></span>
					<span aria-hidden="true">&raquo;</span>
				</a>

			</span>
		</div>
	</div>
</script>
html-webhooks-edit.php000064400000023010151552503300010756 0ustar00<?php
/**
 * Admin View: Edit Webhooks
 *
 * @package WooCommerce\Admin\Webhooks\Views
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>

<input type="hidden" name="webhook_id" value="<?php echo esc_attr( $webhook->get_id() ); ?>" />

<div id="webhook-options" class="settings-panel">
	<h2><?php esc_html_e( 'Webhook data', 'woocommerce' ); ?></h2>
	<table class="form-table">
		<tbody>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<label for="webhook_name">
						<?php esc_html_e( 'Name', 'woocommerce' ); ?>
						<?php
						/* translators: %s: date */
						echo wc_help_tip( sprintf( __( 'Friendly name for identifying this webhook, defaults to Webhook created on %s.', 'woocommerce' ), (new DateTime('now'))->format( _x( 'M d, Y @ h:i A', 'Webhook created on date parsed by DateTime::format', 'woocommerce' ) ) ) ); // @codingStandardsIgnoreLine
						?>
					</label>
				</th>
				<td class="forminp">
					<input name="webhook_name" id="webhook_name" type="text" class="input-text regular-input" value="<?php echo esc_attr( $webhook->get_name() ); ?>" />
				</td>
			</tr>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<label for="webhook_status">
						<?php esc_html_e( 'Status', 'woocommerce' ); ?>
						<?php echo wc_help_tip( __( 'The options are &quot;Active&quot; (delivers payload), &quot;Paused&quot; (does not deliver), or &quot;Disabled&quot; (does not deliver due delivery failures).', 'woocommerce' ) ); ?>
					</label>
				</th>
				<td class="forminp">
					<select name="webhook_status" id="webhook_status" class="wc-enhanced-select">
						<?php
						$statuses       = wc_get_webhook_statuses();
						$current_status = $webhook->get_status();

						foreach ( $statuses as $status_slug => $status_name ) :
							?>
							<option value="<?php echo esc_attr( $status_slug ); ?>" <?php selected( $current_status, $status_slug, true ); ?>><?php echo esc_html( $status_name ); ?></option>
						<?php endforeach; ?>
					</select>
				</td>
			</tr>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<label for="webhook_topic">
						<?php esc_html_e( 'Topic', 'woocommerce' ); ?>
						<?php echo wc_help_tip( __( 'Select when the webhook will fire.', 'woocommerce' ) ); ?>
					</label>
				</th>
				<td class="forminp">
					<select name="webhook_topic" id="webhook_topic" class="wc-enhanced-select">
						<?php
							$topic_data = WC_Admin_Webhooks::get_topic_data( $webhook );

							$topics = apply_filters(
								'woocommerce_webhook_topics',
								array(
									''                 => __( 'Select an option&hellip;', 'woocommerce' ),
									'coupon.created'   => __( 'Coupon created', 'woocommerce' ),
									'coupon.updated'   => __( 'Coupon updated', 'woocommerce' ),
									'coupon.deleted'   => __( 'Coupon deleted', 'woocommerce' ),
									'coupon.restored'  => __( 'Coupon restored', 'woocommerce' ),
									'customer.created' => __( 'Customer created', 'woocommerce' ),
									'customer.updated' => __( 'Customer updated', 'woocommerce' ),
									'customer.deleted' => __( 'Customer deleted', 'woocommerce' ),
									'order.created'    => __( 'Order created', 'woocommerce' ),
									'order.updated'    => __( 'Order updated', 'woocommerce' ),
									'order.deleted'    => __( 'Order deleted', 'woocommerce' ),
									'order.restored'   => __( 'Order restored', 'woocommerce' ),
									'product.created'  => __( 'Product created', 'woocommerce' ),
									'product.updated'  => __( 'Product updated', 'woocommerce' ),
									'product.deleted'  => __( 'Product deleted', 'woocommerce' ),
									'product.restored' => __( 'Product restored', 'woocommerce' ),
									'action'           => __( 'Action', 'woocommerce' ),
								)
							);

							foreach ( $topics as $topic_slug => $topic_name ) :

								$selected = $topic_slug === $topic_data['topic'] || $topic_slug === $topic_data['resource'] . '.' . $topic_data['event'];

								?>
								<option value="<?php echo esc_attr( $topic_slug ); ?>" <?php selected( $selected, true, true ); ?>><?php echo esc_html( $topic_name ); ?></option>
						<?php endforeach; ?>
					</select>
				</td>
			</tr>
			<tr valign="top" id="webhook-action-event-wrap">
				<th scope="row" class="titledesc">
					<label for="webhook_action_event">
						<?php esc_html_e( 'Action event', 'woocommerce' ); ?>
						<?php echo wc_help_tip( __( 'Enter the action that will trigger this webhook.', 'woocommerce' ) ); ?>
					</label>
				</th>
				<td class="forminp">
					<input name="webhook_action_event" id="webhook_action_event" type="text" class="input-text regular-input" value="<?php echo esc_attr( $topic_data['event'] ); ?>" />
				</td>
			</tr>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<label for="webhook_delivery_url">
						<?php esc_html_e( 'Delivery URL', 'woocommerce' ); ?>
						<?php echo wc_help_tip( __( 'URL where the webhook payload is delivered.', 'woocommerce' ) ); ?>
					</label>
				</th>
				<td class="forminp">
					<input name="webhook_delivery_url" id="webhook_delivery_url" type="text" class="input-text regular-input" value="<?php echo esc_attr( $webhook->get_delivery_url() ); ?>" />
				</td>
			</tr>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<label for="webhook_secret">
						<?php esc_html_e( 'Secret', 'woocommerce' ); ?>
						<?php echo wc_help_tip( __( 'The secret key is used to generate a hash of the delivered webhook and provided in the request headers.', 'woocommerce' ) ); ?>
					</label>
				</th>
				<td class="forminp">
					<input name="webhook_secret" id="webhook_secret" type="text" class="input-text regular-input" value="<?php echo esc_attr( $webhook->get_secret() ); ?>" />
				</td>
			</tr>
			<tr valign="top">
				<th scope="row" class="titledesc">
					<label for="webhook_api_version">
						<?php esc_html_e( 'API Version', 'woocommerce' ); ?>
						<?php echo wc_help_tip( __( 'REST API version used in the webhook deliveries.', 'woocommerce' ) ); ?>
					</label>
				</th>
				<td class="forminp">
					<select name="webhook_api_version" id="webhook_api_version">
						<?php foreach ( array_reverse( wc_get_webhook_rest_api_versions() ) as $version ) : ?>
							<option value="<?php echo esc_attr( $version ); ?>" <?php selected( $version, $webhook->get_api_version(), true ); ?>>
								<?php
									/* translators: %d: rest api version number */
									echo esc_html( sprintf( __( 'WP REST API Integration v%d', 'woocommerce' ), str_replace( 'wp_api_v', '', $version ) ) );
								?>
							</option>
						<?php endforeach; ?>
						<option value="legacy_v3" <?php selected( 'legacy_v3', $webhook->get_api_version(), true ); ?>><?php esc_html_e( 'Legacy API v3 (deprecated)', 'woocommerce' ); ?></option>
					</select>
				</td>
			</tr>
		</tbody>
	</table>

	<?php
	/**
	 * Fires within the webhook editor, after the Webhook Data fields have rendered.
	 *
	 * @param WC_Webhook $webhook
	 */
	do_action( 'woocommerce_webhook_options', $webhook );
	?>
</div>

<div id="webhook-actions" class="settings-panel">
	<h2><?php esc_html_e( 'Webhook actions', 'woocommerce' ); ?></h2>
	<table class="form-table">
		<tbody>
			<?php if ( $webhook->get_date_created() && '0000-00-00 00:00:00' !== $webhook->get_date_created()->date( 'Y-m-d H:i:s' ) ) : ?>
				<?php if ( is_null( $webhook->get_date_modified() ) ) : ?>
					<tr valign="top">
						<th scope="row" class="titledesc">
							<?php esc_html_e( 'Created at', 'woocommerce' ); ?>
						</th>
						<td class="forminp">
							<?php echo esc_html( date_i18n( __( 'M j, Y @ G:i', 'woocommerce' ), strtotime( $webhook->get_date_created()->date( 'Y-m-d H:i:s' ) ) ) ); ?>
						</td>
					</tr>
				<?php else : ?>
				<tr valign="top">
						<th scope="row" class="titledesc">
							<?php esc_html_e( 'Created at', 'woocommerce' ); ?>
						</th>
						<td class="forminp">
							<?php echo esc_html( date_i18n( __( 'M j, Y @ G:i', 'woocommerce' ), strtotime( $webhook->get_date_created()->date( 'Y-m-d H:i:s' ) ) ) ); ?>
						</td>
					</tr>
				<tr valign="top">
						<th scope="row" class="titledesc">
							<?php esc_html_e( 'Updated at', 'woocommerce' ); ?>
						</th>
						<td class="forminp">
							<?php echo esc_html( date_i18n( __( 'M j, Y @ G:i', 'woocommerce' ), strtotime( $webhook->get_date_modified()->date( 'Y-m-d H:i:s' ) ) ) ); ?>
						</td>
					</tr>
				<?php endif; ?>
			<?php endif; ?>
			<tr valign="top">
				<td colspan="2" scope="row" style="padding-left: 0;">
					<p class="submit">
						<button type="submit" class="button button-primary button-large" name="save" id="publish" accesskey="p"><?php esc_html_e( 'Save webhook', 'woocommerce' ); ?></button>
						<?php
						if ( $webhook->get_id() ) :
							$delete_url = wp_nonce_url(
								add_query_arg(
									array(
										'delete' => $webhook->get_id(),
									),
									admin_url( 'admin.php?page=wc-settings&tab=advanced&section=webhooks' )
								),
								'delete-webhook'
							);
							?>
							<a style="color: #a00; text-decoration: none; margin-left: 10px;" href="<?php echo esc_url( $delete_url ); ?>"><?php esc_html_e( 'Delete permanently', 'woocommerce' ); ?></a>
						<?php endif; ?>
					</p>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<script type="text/javascript">
	jQuery( function ( $ ) {
		$( '#webhook-options' ).find( '#webhook_topic' ).on( 'change', function() {
			var current            = $( this ).val(),
				action_event_field = $( '#webhook-options' ).find( '#webhook-action-event-wrap' );

			action_event_field.hide();

			if ( 'action' === current ) {
				action_event_field.show();
			}
		}).trigger( 'change' );
	});
</script>
settings-tax.php000064400000010610151552503300007704 0ustar00<?php
/**
 * Tax settings.
 *
 * @package WooCommerce\Admin\Settings.
 */

defined( 'ABSPATH' ) || exit;

$settings = array(

	array(
		'title' => __( 'Tax options', 'woocommerce' ),
		'type'  => 'title',
		'desc'  => '',
		'id'    => 'tax_options',
	),

	array(
		'title'    => __( 'Prices entered with tax', 'woocommerce' ),
		'id'       => 'woocommerce_prices_include_tax',
		'default'  => 'no',
		'type'     => 'radio',
		'desc_tip' => __( 'This option is important as it will affect how you input prices. Changing it will not update existing products.', 'woocommerce' ),
		'options'  => array(
			'yes' => __( 'Yes, I will enter prices inclusive of tax', 'woocommerce' ),
			'no'  => __( 'No, I will enter prices exclusive of tax', 'woocommerce' ),
		),
	),

	array(
		'title'    => __( 'Calculate tax based on', 'woocommerce' ),
		'id'       => 'woocommerce_tax_based_on',
		'desc_tip' => __( 'This option determines which address is used to calculate tax.', 'woocommerce' ),
		'default'  => 'shipping',
		'type'     => 'select',
		'class'    => 'wc-enhanced-select',
		'options'  => array(
			'shipping' => __( 'Customer shipping address', 'woocommerce' ),
			'billing'  => __( 'Customer billing address', 'woocommerce' ),
			'base'     => __( 'Shop base address', 'woocommerce' ),
		),
	),

	'shipping-tax-class' => array(
		'title'    => __( 'Shipping tax class', 'woocommerce' ),
		'desc'     => __( 'Optionally control which tax class shipping gets, or leave it so shipping tax is based on the cart items themselves.', 'woocommerce' ),
		'id'       => 'woocommerce_shipping_tax_class',
		'css'      => 'min-width:150px;',
		'default'  => 'inherit',
		'type'     => 'select',
		'class'    => 'wc-enhanced-select',
		'options'  => array( 'inherit' => __( 'Shipping tax class based on cart items', 'woocommerce' ) ) + wc_get_product_tax_class_options(),
		'desc_tip' => true,
	),

	array(
		'title'   => __( 'Rounding', 'woocommerce' ),
		'desc'    => __( 'Round tax at subtotal level, instead of rounding per line', 'woocommerce' ),
		'id'      => 'woocommerce_tax_round_at_subtotal',
		'default' => 'no',
		'type'    => 'checkbox',
	),

	array(
		'title'     => __( 'Additional tax classes', 'woocommerce' ),
		'desc_tip'  => __( 'List additional tax classes you need below (1 per line, e.g. Reduced Rates). These are in addition to "Standard rate" which exists by default.', 'woocommerce' ),
		'id'        => 'woocommerce_tax_classes',
		'css'       => 'height: 65px;',
		'type'      => 'textarea',
		'default'   => '',
		'is_option' => false,
		'value'     => implode( "\n", WC_Tax::get_tax_classes() ),
	),

	array(
		'title'   => __( 'Display prices in the shop', 'woocommerce' ),
		'id'      => 'woocommerce_tax_display_shop',
		'default' => 'excl',
		'type'    => 'select',
		'class'   => 'wc-enhanced-select',
		'options' => array(
			'incl' => __( 'Including tax', 'woocommerce' ),
			'excl' => __( 'Excluding tax', 'woocommerce' ),
		),
	),

	array(
		'title'   => __( 'Display prices during cart and checkout', 'woocommerce' ),
		'id'      => 'woocommerce_tax_display_cart',
		'default' => 'excl',
		'type'    => 'select',
		'class'   => 'wc-enhanced-select',
		'options' => array(
			'incl' => __( 'Including tax', 'woocommerce' ),
			'excl' => __( 'Excluding tax', 'woocommerce' ),
		),
	),

	array( 'type' => 'conflict_error' ), // React mount point for embedded banner slotfill.

	array(
		'title'       => __( 'Price display suffix', 'woocommerce' ),
		'id'          => 'woocommerce_price_display_suffix',
		'default'     => '',
		'placeholder' => __( 'N/A', 'woocommerce' ),
		'type'        => 'text',
		'desc_tip'    => __( 'Define text to show after your product prices. This could be, for example, "inc. Vat" to explain your pricing. You can also have prices substituted here using one of the following: {price_including_tax}, {price_excluding_tax}.', 'woocommerce' ),
	),

	array(
		'title'    => __( 'Display tax totals', 'woocommerce' ),
		'id'       => 'woocommerce_tax_total_display',
		'default'  => 'itemized',
		'type'     => 'select',
		'class'    => 'wc-enhanced-select',
		'options'  => array(
			'single'   => __( 'As a single total', 'woocommerce' ),
			'itemized' => __( 'Itemized', 'woocommerce' ),
		),
		'autoload' => false,
	),

	array(
		'type' => 'sectionend',
		'id'   => 'tax_options',
	),

);

if ( ! wc_shipping_enabled() ) {
	unset( $settings['shipping-tax-class'] );
}

return apply_filters( 'woocommerce_tax_settings', $settings );
html-csv-import-done.php000064400000006305151553643030011256 0ustar00<?php
/**
 * Admin View: Importer - Done!
 *
 * @package WooCommerce\Admin\Importers
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div class="wc-progress-form-content woocommerce-importer">
	<section class="woocommerce-importer-done">
		<?php
		$results = array();

		if ( 0 < $imported ) {
			$results[] = sprintf(
				/* translators: %d: products count */
				_n( '%s product imported', '%s products imported', $imported, 'woocommerce' ),
				'<strong>' . number_format_i18n( $imported ) . '</strong>'
			);
		}

		if ( 0 < $updated ) {
			$results[] = sprintf(
				/* translators: %d: products count */
				_n( '%s product updated', '%s products updated', $updated, 'woocommerce' ),
				'<strong>' . number_format_i18n( $updated ) . '</strong>'
			);
		}

		if ( 0 < $imported_variations ) {
			$results[] = sprintf(
				/* translators: %d: products count */
				_n( '%s variations imported', '%s variations imported', $imported_variations, 'woocommerce' ),
				'<strong>' . number_format_i18n( $imported_variations ) . '</strong>'
			);
		}

		if ( 0 < $skipped ) {
			$results[] = sprintf(
				/* translators: %d: products count */
				_n( '%s product was skipped', '%s products were skipped', $skipped, 'woocommerce' ),
				'<strong>' . number_format_i18n( $skipped ) . '</strong>'
			);
		}

		if ( 0 < $failed ) {
			$results [] = sprintf(
				/* translators: %d: products count */
				_n( 'Failed to import %s product', 'Failed to import %s products', $failed, 'woocommerce' ),
				'<strong>' . number_format_i18n( $failed ) . '</strong>'
			);
		}

		if ( 0 < $failed || 0 < $skipped ) {
			$results[] = '<a href="#" class="woocommerce-importer-done-view-errors">' . __( 'View import log', 'woocommerce' ) . '</a>';
		}

		if ( ! empty( $file_name ) ) {
			$results[] = sprintf(
				/* translators: %s: File name */
				__( 'File uploaded: %s', 'woocommerce' ),
				'<strong>' . $file_name . '</strong>'
			);
		}

		/* translators: %d: import results */
		echo wp_kses_post( __( 'Import complete!', 'woocommerce' ) . ' ' . implode( '. ', $results ) );
		?>
	</section>
	<section class="wc-importer-error-log" style="display:none">
		<table class="widefat wc-importer-error-log-table">
			<thead>
				<tr>
					<th><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
					<th><?php esc_html_e( 'Reason for failure', 'woocommerce' ); ?></th>
				</tr>
			</thead>
			<tbody>
				<?php
				if ( count( $errors ) ) {
					foreach ( $errors as $error ) {
						if ( ! is_wp_error( $error ) ) {
							continue;
						}
						$error_data = $error->get_error_data();
						?>
						<tr>
							<th><code><?php echo esc_html( $error_data['row'] ); ?></code></th>
							<td><?php echo wp_kses_post( $error->get_error_message() ); ?></td>
						</tr>
						<?php
					}
				}
				?>
			</tbody>
		</table>
	</section>
	<script type="text/javascript">
		jQuery(function() {
			jQuery( '.woocommerce-importer-done-view-errors' ).on( 'click', function() {
				jQuery( '.wc-importer-error-log' ).slideToggle();
				return false;
			} );
		} );
	</script>
	<div class="wc-actions">
		<a class="button button-primary" href="<?php echo esc_url( admin_url( 'edit.php?post_type=product' ) ); ?>"><?php esc_html_e( 'View products', 'woocommerce' ); ?></a>
	</div>
</div>
html-csv-import-footer.php000064400000000213151553643030011617 0ustar00<?php
/**
 * Admin View: Header
 *
 * @package WooCommerce\Admin\Importers
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
	</div>
</div>
html-csv-import-header.php000064400000000420151553643030011551 0ustar00<?php
/**
 * Admin View: Header
 *
 * @package WooCommerce\Admin\Importers
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div class="wrap woocommerce">
	<h1><?php esc_html_e( 'Import Products', 'woocommerce' ); ?></h1>

	<div class="woocommerce-progress-form-wrapper">
html-csv-import-mapping.php000064400000006236151553643030011767 0ustar00<?php
/**
 * Admin View: Importer - CSV mapping
 *
 * @package WooCommerce\Admin\Importers
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<form class="wc-progress-form-content woocommerce-importer" method="post" action="<?php echo esc_url( $this->get_next_step_link() ); ?>">
	<header>
		<h2><?php esc_html_e( 'Map CSV fields to products', 'woocommerce' ); ?></h2>
		<p><?php esc_html_e( 'Select fields from your CSV file to map against products fields, or to ignore during import.', 'woocommerce' ); ?></p>
	</header>
	<section class="wc-importer-mapping-table-wrapper">
		<table class="widefat wc-importer-mapping-table">
			<thead>
				<tr>
					<th><?php esc_html_e( 'Column name', 'woocommerce' ); ?></th>
					<th><?php esc_html_e( 'Map to field', 'woocommerce' ); ?></th>
				</tr>
			</thead>
			<tbody>
				<?php foreach ( $headers as $index => $name ) : ?>
					<?php $mapped_value = $mapped_items[ $index ]; ?>
					<tr>
						<td class="wc-importer-mapping-table-name">
							<?php echo esc_html( $name ); ?>
							<?php if ( ! empty( $sample[ $index ] ) ) : ?>
								<span class="description"><?php esc_html_e( 'Sample:', 'woocommerce' ); ?> <code><?php echo esc_html( $sample[ $index ] ); ?></code></span>
							<?php endif; ?>
						</td>
						<td class="wc-importer-mapping-table-field">
							<input type="hidden" name="map_from[<?php echo esc_attr( $index ); ?>]" value="<?php echo esc_attr( $name ); ?>" />
							<select name="map_to[<?php echo esc_attr( $index ); ?>]">
								<option value=""><?php esc_html_e( 'Do not import', 'woocommerce' ); ?></option>
								<option value="">--------------</option>
								<?php foreach ( $this->get_mapping_options( $mapped_value ) as $key => $value ) : ?>
									<?php if ( is_array( $value ) ) : ?>
										<optgroup label="<?php echo esc_attr( $value['name'] ); ?>">
											<?php foreach ( $value['options'] as $sub_key => $sub_value ) : ?>
												<option value="<?php echo esc_attr( $sub_key ); ?>" <?php selected( $mapped_value, $sub_key ); ?>><?php echo esc_html( $sub_value ); ?></option>
											<?php endforeach ?>
										</optgroup>
									<?php else : ?>
										<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $mapped_value, $key ); ?>><?php echo esc_html( $value ); ?></option>
									<?php endif; ?>
								<?php endforeach ?>
							</select>
						</td>
					</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
	</section>
	<div class="wc-actions">
		<button type="submit" class="button button-primary button-next" value="<?php esc_attr_e( 'Run the importer', 'woocommerce' ); ?>" name="save_step"><?php esc_html_e( 'Run the importer', 'woocommerce' ); ?></button>
		<input type="hidden" name="file" value="<?php echo esc_attr( $this->file ); ?>" />
		<input type="hidden" name="delimiter" value="<?php echo esc_attr( $this->delimiter ); ?>" />
		<input type="hidden" name="update_existing" value="<?php echo (int) $this->update_existing; ?>" />
		<?php if ( $args['character_encoding'] ) { ?>
			<input type="hidden" name="character_encoding" value="<?php echo esc_html( $args['character_encoding'] ); ?>" />
		<?php } ?>
		<?php wp_nonce_field( 'woocommerce-csv-importer' ); ?>
	</div>
</form>
html-csv-import-progress.php000064400000001067151553643030012175 0ustar00<?php
/**
 * Admin View: Importer - CSV import progress
 *
 * @package WooCommerce\Admin\Importers
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div class="wc-progress-form-content woocommerce-importer woocommerce-importer__importing">
	<header>
		<span class="spinner is-active"></span>
		<h2><?php esc_html_e( 'Importing', 'woocommerce' ); ?></h2>
		<p><?php esc_html_e( 'Your products are now being imported...', 'woocommerce' ); ?></p>
	</header>
	<section>
		<progress class="woocommerce-importer-progress" max="100" value="0"></progress>
	</section>
</div>
html-csv-import-steps.php000064400000001146151553643030011465 0ustar00<?php
/**
 * Admin View: Steps
 *
 * @package WooCommerce\Admin\Importers
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<ol class="wc-progress-steps">
	<?php foreach ( $this->steps as $step_key => $step ) : ?>
		<?php
		$step_class = '';
		if ( $step_key === $this->step ) {
			$step_class = 'active';
		} elseif ( array_search( $this->step, array_keys( $this->steps ), true ) > array_search( $step_key, array_keys( $this->steps ), true ) ) {
			$step_class = 'done';
		}
		?>
		<li class="<?php echo esc_attr( $step_class ); ?>">
			<?php echo esc_html( $step['name'] ); ?>
		</li>
	<?php endforeach; ?>
</ol>
html-product-csv-import-form.php000064400000011524151553643030012751 0ustar00<?php
/**
 * Admin View: Product import form
 *
 * @package WooCommerce\Admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<form class="wc-progress-form-content woocommerce-importer" enctype="multipart/form-data" method="post">
	<header>
		<h2><?php esc_html_e( 'Import products from a CSV file', 'woocommerce' ); ?></h2>
		<p><?php esc_html_e( 'This tool allows you to import (or merge) product data to your store from a CSV or TXT file.', 'woocommerce' ); ?></p>
	</header>
	<section>
		<table class="form-table woocommerce-importer-options">
			<tbody>
				<tr>
					<th scope="row">
						<label for="upload">
							<?php esc_html_e( 'Choose a CSV file from your computer:', 'woocommerce' ); ?>
						</label>
					</th>
					<td>
						<?php
						if ( ! empty( $upload_dir['error'] ) ) {
							?>
							<div class="inline error">
								<p><?php esc_html_e( 'Before you can upload your import file, you will need to fix the following error:', 'woocommerce' ); ?></p>
								<p><strong><?php echo esc_html( $upload_dir['error'] ); ?></strong></p>
							</div>
							<?php
						} else {
							?>
							<input type="file" id="upload" name="import" size="25" />
							<input type="hidden" name="action" value="save" />
							<input type="hidden" name="max_file_size" value="<?php echo esc_attr( $bytes ); ?>" />
							<br>
							<small>
								<?php
								printf(
									/* translators: %s: maximum upload size */
									esc_html__( 'Maximum size: %s', 'woocommerce' ),
									esc_html( $size )
								);
								?>
							</small>
							<?php
						}
						?>
					</td>
				</tr>
				<tr>
					<th><label for="woocommerce-importer-update-existing"><?php esc_html_e( 'Update existing products', 'woocommerce' ); ?></label><br/></th>
					<td>
						<input type="hidden" name="update_existing" value="0" />
						<input type="checkbox" id="woocommerce-importer-update-existing" name="update_existing" value="1" />
						<label for="woocommerce-importer-update-existing"><?php esc_html_e( 'Existing products that match by ID or SKU will be updated. Products that do not exist will be skipped.', 'woocommerce' ); ?></label>
					</td>
				</tr>
				<tr class="woocommerce-importer-advanced hidden">
					<th>
						<label for="woocommerce-importer-file-url"><?php esc_html_e( 'Alternatively, enter the path to a CSV file on your server:', 'woocommerce' ); ?></label>
					</th>
					<td>
						<label for="woocommerce-importer-file-url" class="woocommerce-importer-file-url-field-wrapper">
							<code><?php echo esc_html( ABSPATH ) . ' '; ?></code><input type="text" id="woocommerce-importer-file-url" name="file_url" />
						</label>
					</td>
				</tr>
				<tr class="woocommerce-importer-advanced hidden">
					<th><label><?php esc_html_e( 'CSV Delimiter', 'woocommerce' ); ?></label><br/></th>
					<td><input type="text" name="delimiter" placeholder="," size="2" /></td>
				</tr>
				<tr class="woocommerce-importer-advanced hidden">
					<th><label><?php esc_html_e( 'Use previous column mapping preferences?', 'woocommerce' ); ?></label><br/></th>
					<td><input type="checkbox" id="woocommerce-importer-map-preferences" name="map_preferences" value="1" /></td>
				</tr>
				<tr class="woocommerce-importer-advanced hidden">
					<th><label><?php esc_html_e( 'Character encoding of the file', 'woocommerce' ); ?></label><br/></th>
					<td><select id="woocommerce-importer-character-encoding" name="character_encoding">
							<option value="" selected><?php esc_html_e( 'Autodetect', 'woocommerce' ); ?></option>
							<?php
							$encodings = mb_list_encodings();
							sort( $encodings, SORT_NATURAL );
							foreach ( $encodings as $encoding ) {
								echo '<option>' . esc_html( $encoding ) . '</option>';
							}
							?>
						</select>
					</td>
				</tr>
			</tbody>
		</table>
	</section>
	<script type="text/javascript">
		jQuery(function() {
			jQuery( '.woocommerce-importer-toggle-advanced-options' ).on( 'click', function() {
				var elements = jQuery( '.woocommerce-importer-advanced' );
				if ( elements.is( '.hidden' ) ) {
					elements.removeClass( 'hidden' );
					jQuery( this ).text( jQuery( this ).data( 'hidetext' ) );
				} else {
					elements.addClass( 'hidden' );
					jQuery( this ).text( jQuery( this ).data( 'showtext' ) );
				}
				return false;
			} );
		});
	</script>
	<div class="wc-actions">
		<a href="#" class="woocommerce-importer-toggle-advanced-options" data-hidetext="<?php esc_attr_e( 'Hide advanced options', 'woocommerce' ); ?>" data-showtext="<?php esc_attr_e( 'Show advanced options', 'woocommerce' ); ?>"><?php esc_html_e( 'Show advanced options', 'woocommerce' ); ?></a>
		<button type="submit" class="button button-primary button-next" value="<?php esc_attr_e( 'Continue', 'woocommerce' ); ?>" name="save_step"><?php esc_html_e( 'Continue', 'woocommerce' ); ?></button>
		<?php wp_nonce_field( 'woocommerce-csv-importer' ); ?>
	</div>
</form>
html-helper-compat.php000064400000000726151554100330010761 0ustar00<?php defined( 'ABSPATH' ) or exit(); ?>

<div class="wrap">
	<h1><?php _e( 'Looking for the WooCommerce Helper?', 'woocommerce' ); ?></h1>
	<p><?php printf( __( 'We\'ve made things simpler and easier to manage moving forward. From now on you can manage all your WooCommerce purchases directly from the Extensions menu within the WooCommerce plugin itself. <a href="%s">View and manage</a> your extensions now.', 'woocommerce' ), esc_url( $helper_url ) ); ?></p>
</div>
html-main.php000064400000026420151554100330007144 0ustar00<?php
/**
 * Helper main view
 *
 * @package WooCommerce\Helper
 */

?>
<?php defined( 'ABSPATH' ) || exit(); ?>

<div class="wrap woocommerce wc-subscriptions-wrap wc-helper">
	<?php require WC_Helper::get_view_filename( 'html-section-nav.php' ); ?>
	<h1 class="screen-reader-text"><?php esc_html_e( 'WooCommerce Extensions', 'woocommerce' ); ?></h1>

	<?php require WC_Helper::get_view_filename( 'html-section-notices.php' ); ?>

	<div class="subscriptions-header">
		<h2><?php esc_html_e( 'Subscriptions', 'woocommerce' ); ?></h2>
		<?php require WC_Helper::get_view_filename( 'html-section-account.php' ); ?>
		<p>
			<?php
			printf(
				wp_kses(
					/* translators: Introduction to list of WooCommerce.com extensions the merchant has subscriptions for. */
					__(
						'Below is a list of extensions available on your WooCommerce.com account. To receive extension updates please make sure the extension is installed, and its subscription activated and connected to your WooCommerce.com account. Extensions can be activated from the <a href="%s">Plugins</a> screen.',
						'woocommerce'
					),
					array(
						'a' => array(
							'href' => array(),
						),
					)
				),
				esc_url(
					admin_url( 'plugins.php' )
				)
			);
			?>
		</p>
	</div>

	<ul class="subscription-filter">
		<label><?php esc_html_e( 'Sort by:', 'woocommerce' ); ?> <span class="chevron dashicons dashicons-arrow-up-alt2"></span></label>
		<?php
			$filters        = array_keys( WC_Helper::get_filters() );
			$last_filter    = array_pop( $filters );
			$current_filter = WC_Helper::get_current_filter();
			$counts         = WC_Helper::get_filters_counts();
		?>

		<?php
		foreach ( WC_Helper::get_filters() as $key => $label ) :
			// Don't show empty filters.
			if ( empty( $counts[ $key ] ) ) {
				continue;
			}

			$url        = admin_url( 'admin.php?page=wc-addons&section=helper&filter=' . $key );
			$class_html = $current_filter === $key ? 'class="current"' : '';
			?>
			<li>
				<?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
				<a <?php echo $class_html; ?> href="<?php echo esc_url( $url ); ?>">
					<?php echo esc_html( $label ); ?>
					<span class="count">(<?php echo absint( $counts[ $key ] ); ?>)</span>
				</a>
			</li>
		<?php endforeach; ?>
	</ul>

	<table class="wp-list-table widefat fixed striped">
		<?php if ( ! empty( $subscriptions ) ) : ?>
			<?php foreach ( $subscriptions as $subscription ) : ?>
				<tbody>
				<tr class="wp-list-table__row is-ext-header">
					<td class="wp-list-table__ext-details">
						<div class="wp-list-table__ext-title">
							<a href="<?php echo esc_url( WC_Helper::add_utm_params_to_url_for_subscription_link( $subscription['product_url'], 'product-name' ) ); ?>" target="_blank">
								<?php echo esc_html( $subscription['product_name'] ); ?>
							</a>
						</div>

						<div class="wp-list-table__ext-description">
							<?php if ( $subscription['lifetime'] ) : ?>
								<span class="renews">
									<?php esc_html_e( 'Lifetime Subscription', 'woocommerce' ); ?>
								</span>
							<?php elseif ( $subscription['expired'] ) : ?>
								<span class="renews">
									<strong><?php esc_html_e( 'Expired :(', 'woocommerce' ); ?></strong>
									<?php echo esc_html( date_i18n( 'F jS, Y', $subscription['expires'] ) ); ?>
								</span>
							<?php elseif ( $subscription['autorenew'] ) : ?>
								<span class="renews">
									<?php esc_html_e( 'Auto renews on:', 'woocommerce' ); ?>
									<?php echo esc_html( date_i18n( 'F jS, Y', $subscription['expires'] ) ); ?>
								</span>
							<?php elseif ( $subscription['expiring'] ) : ?>
								<span class="renews">
									<strong><?php esc_html_e( 'Expiring soon!', 'woocommerce' ); ?></strong>
									<?php echo esc_html( date_i18n( 'F jS, Y', $subscription['expires'] ) ); ?>
								</span>
							<?php else : ?>
								<span class="renews">
									<?php esc_html_e( 'Expires on:', 'woocommerce' ); ?>
									<?php echo esc_html( date_i18n( 'F jS, Y', $subscription['expires'] ) ); ?>
								</span>
							<?php endif; ?>

							<br/>
							<span class="subscription">
								<?php
								if ( ! $subscription['active'] && $subscription['maxed'] ) {
									/* translators: %1$d: sites active, %2$d max sites active */
									printf( esc_html__( 'Subscription: Not available - %1$d of %2$d already in use', 'woocommerce' ), absint( $subscription['sites_active'] ), absint( $subscription['sites_max'] ) );
								} elseif ( $subscription['sites_max'] > 0 ) {
									/* translators: %1$d: sites active, %2$d max sites active */
									printf( esc_html__( 'Subscription: Using %1$d of %2$d sites available', 'woocommerce' ), absint( $subscription['sites_active'] ), absint( $subscription['sites_max'] ) );
								} else {
									esc_html_e( 'Subscription: Unlimited', 'woocommerce' );
								}

								// Check shared.
								if ( ! empty( $subscription['is_shared'] ) && ! empty( $subscription['owner_email'] ) ) {
									/* translators: Email address of person who shared the subscription. */
									printf( '</br>' . esc_html__( 'Shared by %s', 'woocommerce' ), esc_html( $subscription['owner_email'] ) );
								} elseif ( isset( $subscription['master_user_email'] ) ) {
									/* translators: Email address of person who shared the subscription. */
									printf( '</br>' . esc_html__( 'Shared by %s', 'woocommerce' ), esc_html( $subscription['master_user_email'] ) );
								}
								?>
							</span>
						</div>
					</td>
					<td class="wp-list-table__ext-actions">
						<?php if ( ! $subscription['active'] && $subscription['maxed'] ) : ?>
							<a class="button" href="https://woocommerce.com/my-account/my-subscriptions/" target="_blank"><?php esc_html_e( 'Upgrade', 'woocommerce' ); ?></a>
						<?php elseif ( ! $subscription['local']['installed'] && ! $subscription['expired'] ) : ?>
							<a class="button <?php echo empty( $subscription['download_primary'] ) ? 'button-secondary' : ''; ?>" href="<?php echo esc_url( $subscription['download_url'] ); ?>" target="_blank"><?php esc_html_e( 'Download', 'woocommerce' ); ?></a>
						<?php elseif ( $subscription['active'] ) : ?>
							<span class="form-toggle__wrapper">
								<a href="<?php echo esc_url( $subscription['deactivate_url'] ); ?>" class="form-toggle active is-compact" role="link" aria-checked="true"><?php esc_html_e( 'Active', 'woocommerce' ); ?></a>
								<label class="form-toggle__label" for="activate-extension">
									<span class="form-toggle__label-content">
										<label for="activate-extension"><?php esc_html_e( 'Active', 'woocommerce' ); ?></label>
									</span>
									<span class="form-toggle__switch"></span>
								</label>
							</span>
						<?php elseif ( ! $subscription['expired'] ) : ?>
							<span class="form-toggle__wrapper">
								<a href="<?php echo esc_url( $subscription['activate_url'] ); ?>" class="form-toggle is-compact" role="link" aria-checked="false"><?php esc_html_e( 'Inactive', 'woocommerce' ); ?></a>
								<label class="form-toggle__label" for="activate-extension">
									<span class="form-toggle__label-content">
										<label for="activate-extension"><?php esc_html_e( 'Inactive', 'woocommerce' ); ?></label>
									</span>
									<span class="form-toggle__switch"></span>
								</label>
							</span>
						<?php else : ?>
							<span class="form-toggle__wrapper">
								<span class="form-toggle disabled is-compact"><?php esc_html_e( 'Inactive', 'woocommerce' ); ?></span>
								<label class="form-toggle__label" for="activate-extension">
									<span class="form-toggle__label-content">
										<label for="activate-extension"><?php esc_html_e( 'Inactive', 'woocommerce' ); ?></label>
									</span>
								</label>
							</span>
						<?php endif; ?>
					</td>
				</tr>

				<?php foreach ( $subscription['actions'] as $subscription_action ) : ?>
				<tr class="wp-list-table__row wp-list-table__ext-updates">
					<td class="wp-list-table__ext-status <?php echo sanitize_html_class( $subscription_action['status'] ); ?>">
						<p><span class="dashicons <?php echo sanitize_html_class( $subscription_action['icon'] ); ?>"></span>
							<?php echo wp_kses_post( $subscription_action['message'] ); ?>
						</p>
					</td>
					<td class="wp-list-table__ext-actions">
						<?php if ( ! empty( $subscription_action['button_label'] ) && ! empty( $subscription_action['button_url'] ) ) : ?>
						<a class="button <?php echo empty( $subscription_action['primary'] ) ? 'button-secondary' : ''; ?>" href="<?php echo esc_url( $subscription_action['button_url'] ); ?>"><?php echo esc_html( $subscription_action['button_label'] ); ?></a>
						<?php endif; ?>
					</td>
				</tr>
				<?php endforeach; ?>

				</tbody>
			<?php endforeach; ?>
		<?php else : ?>
			<tr>
				<td colspan="3"><em><?php esc_html_e( 'Could not find any subscriptions on your WooCommerce.com account', 'woocommerce' ); ?></td>
			</tr>
		<?php endif; ?>
		</tbody>
	</table>

	<?php if ( ! empty( $no_subscriptions ) ) : ?>
		<h2><?php esc_html_e( 'Installed Extensions without a Subscription', 'woocommerce' ); ?></h2>
		<p>Below is a list of WooCommerce.com products available on your site - but are either out-dated or do not have a valid subscription.</p>

		<table class="wp-list-table widefat fixed striped">
			<?php /* Extensions without a subscription. */ ?>
			<?php foreach ( $no_subscriptions as $filename => $data ) : ?>
				<tbody>
					<tr class="wp-list-table__row is-ext-header">
						<td class="wp-list-table__ext-details color-bar autorenews">
							<div class="wp-list-table__ext-title">
								<a href="<?php echo esc_url( WC_Helper::add_utm_params_to_url_for_subscription_link( $data['_product_url'], 'product-name' ) ); ?>" target="_blank">
									<?php echo esc_html( $data['Name'] ); ?>
								</a>
							</div>
							<div class="wp-list-table__ext-description">
							</div>
						</td>
						<td class="wp-list-table__ext-actions">
							<span class="form-toggle__wrapper">
								<span class="form-toggle disabled is-compact" ><?php esc_html_e( 'Inactive', 'woocommerce' ); ?></span>
								<label class="form-toggle__label" for="activate-extension">
									<span class="form-toggle__label-content">
										<label for="activate-extension"><?php esc_html_e( 'Inactive', 'woocommerce' ); ?></label>
									</span>
								</label>
							</span>
						</td>
					</tr>

					<?php foreach ( $data['_actions'] as $subscription_action ) : ?>
					<tr class="wp-list-table__row wp-list-table__ext-updates">
						<td class="wp-list-table__ext-status <?php echo sanitize_html_class( $subscription_action['status'] ); ?>">
							<p><span class="dashicons <?php echo sanitize_html_class( $subscription_action['icon'] ); ?>"></span>
								<?php
									echo wp_kses(
										$subscription_action['message'],
										array(
											'a'      => array(
												'href'  => array(),
												'title' => array(),
											),
											'br'     => array(),
											'em'     => array(),
											'strong' => array(),
										)
									);
								?>
							</p>
						</td>
						<td class="wp-list-table__ext-actions">
							<a class="button" href="<?php echo esc_url( $subscription_action['button_url'] ); ?>" target="_blank"><?php echo esc_html( $subscription_action['button_label'] ); ?></a>
						</td>
					</tr>
					<?php endforeach; ?>

				</tbody>

			<?php endforeach; ?>
		</table>
	<?php endif; ?>
</div>
html-oauth-start.php000064400000002772151554100330010477 0ustar00<?php
/**
 * Admin -> WooCommerce -> Extensions -> WooCommerce.com Subscriptions main page.
 *
 * @package WooCommerce\Views
 */

defined( 'ABSPATH' ) || exit();

?>

<div class="wrap woocommerce wc-addons-wrap wc-helper">
	<?php require WC_Helper::get_view_filename( 'html-section-nav.php' ); ?>
	<h1 class="screen-reader-text"><?php esc_html_e( 'WooCommerce Extensions', 'woocommerce' ); ?></h1>
	<?php require WC_Helper::get_view_filename( 'html-section-notices.php' ); ?>

		<div class="start-container">
			<div class="text">
				<img src="<?php echo esc_url( WC()->plugin_url() . '/assets/images/woocommerce_logo.png' ); ?>" alt="<?php esc_attr_e( 'WooCommerce', 'woocommerce' ); ?>" style="width:180px;">

				<?php if ( ! empty( $_GET['wc-helper-status'] ) && 'helper-disconnected' === $_GET['wc-helper-status'] ) : ?>
					<p><strong><?php esc_html_e( 'Sorry to see you go.', 'woocommerce' ); ?></strong> <?php esc_html_e( 'Feel free to reconnect again using the button below.', 'woocommerce' ); ?></p>
				<?php endif; ?>

				<h2><?php esc_html_e( 'Manage your subscriptions, get important product notifications, and updates, all from the convenience of your WooCommerce dashboard', 'woocommerce' ); ?></h2>
				<p><?php esc_html_e( 'Once connected, your WooCommerce.com purchases will be listed here.', 'woocommerce' ); ?></p>
				<p><a class="button button-primary button-helper-connect" href="<?php echo esc_url( $connect_url ); ?>"><?php esc_html_e( 'Connect', 'woocommerce' ); ?></a></p>
			</div>
		</div>
</div>
html-section-account.php000064400000001667151554100330011324 0ustar00<?php defined( 'ABSPATH' ) or exit(); ?>

<a class="button button-update" href="<?php echo esc_url( $refresh_url ); ?>"><span class="dashicons dashicons-image-rotate"></span> <?php _e( 'Update', 'woocommerce' ); ?></a>
<div class="user-info">
	<header>
		<p><?php printf( __( 'Connected to WooCommerce.com', 'woocommerce' ) ); ?> <span class="chevron dashicons dashicons-arrow-down-alt2"></span></p>
	</header>
	<section>
		<p><?php echo get_avatar( $auth_user_data['email'], 48 ); ?> <?php echo esc_html( $auth_user_data['email'] ); ?></p>
		<div class="actions">
			<a class="" href="https://woocommerce.com/my-account/my-subscriptions/" target="_blank"><span class="dashicons dashicons-admin-generic"></span> <?php _e( 'My Subscriptions', 'woocommerce' ); ?></a>
			<a class="" href="<?php echo esc_url( $disconnect_url ); ?>"><span class="dashicons dashicons-no"></span> <?php _e( 'Disconnect', 'woocommerce' ); ?></a>
		</div>
	</section>
</div>
html-section-nav.php000064400000001720151554100330010442 0ustar00<?php
/**
 * Helper admin navigation.
 *
 * @package WooCommerce\Helper
 *
 * @deprecated 5.7.0
 */

use Automattic\WooCommerce\Utilities\FeaturesUtil;

$addons_url = admin_url( 'admin.php?page=wc-addons' );
if ( FeaturesUtil::feature_is_enabled( 'marketplace' ) ) {
	$addons_url = admin_url( 'admin.php?page=wc-admin&path=/extensions&tab=extensions' );
}

defined( 'ABSPATH' ) || exit(); ?>

<nav class="nav-tab-wrapper woo-nav-tab-wrapper">
	<a href="<?php echo esc_url( $addons_url ); ?>" class="nav-tab"><?php esc_html_e( 'Browse Extensions', 'woocommerce' ); ?></a>

	<?php
		$count_html = WC_Helper_Updater::get_updates_count_html();
		/* translators: %s: WooCommerce.com Subscriptions tab count HTML. */
		$menu_title = sprintf( __( 'My Subscriptions %s', 'woocommerce' ), $count_html );
	?>
	<a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-addons&section=helper' ) ); ?>" class="nav-tab nav-tab-active"><?php echo wp_kses_post( $menu_title ); ?></a>
</nav>
html-section-notices.php000064400000000355151554100330011325 0ustar00<?php defined( 'ABSPATH' ) or exit(); ?>

<?php foreach ( $notices as $notice ) : ?>
	<div class="notice <?php echo sanitize_html_class( $notice['type'] ); ?>">
		<?php echo wpautop( $notice['message'] ); ?>
	</div>
<?php endforeach; ?>
container.php000064400000000437151556775470007271 0ustar00<?php
/**
 * Marketplace suggestions container
 *
 * @package  WooCommerce\Templates
 * @version  3.6.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

?>
<div class="marketplace-suggestions-container"
	data-marketplace-suggestions-context="<?php echo esc_attr( $context ); ?>"
	>
</div>
html-order-download-permission.php000064400000007034151557063630013344 0ustar00<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div class="wc-metabox closed">
	<h3 class="fixed">
		<button type="button" data-permission_id="<?php echo esc_attr( $download->get_id() ); ?>" rel="<?php echo esc_attr( $download->get_product_id() ) . ',' . esc_attr( $download->get_download_id() ); ?>" class="revoke_access button"><?php esc_html_e( 'Revoke access', 'woocommerce' ); ?></button>
		<div class="handlediv" aria-label="<?php esc_attr_e( 'Click to toggle', 'woocommerce' ); ?>"></div>
		<strong>
			<?php
			printf(
				'#%s &mdash; %s &mdash; %s: %s &mdash; ',
				esc_html( $product->get_id() ),
				esc_html( apply_filters( 'woocommerce_admin_download_permissions_title', $product->get_name(), $download->get_product_id(), $download->get_order_id(), $download->get_order_key(), $download->get_download_id() ) ),
				esc_html( $file_count ),
				esc_html( wc_get_filename_from_url( $product->get_file_download_path( $download->get_download_id() ) ) )
			);
			printf( _n( 'Downloaded %s time', 'Downloaded %s times', $download->get_download_count(), 'woocommerce' ), esc_html( $download->get_download_count() ) )
			?>
		</strong>
	</h3>
	<table cellpadding="0" cellspacing="0" class="wc-metabox-content">
		<tbody>
			<tr>
				<td>
					<label><?php esc_html_e( 'Downloads remaining', 'woocommerce' ); ?></label>
					<input type="hidden" name="permission_id[<?php echo esc_attr( $loop ); ?>]" value="<?php echo esc_attr( $download->get_id() ); ?>" />
					<input type="number" step="1" min="0" class="short" name="downloads_remaining[<?php echo esc_attr( $loop ); ?>]" value="<?php echo esc_attr( $download->get_downloads_remaining() ); ?>" placeholder="<?php esc_attr_e( 'Unlimited', 'woocommerce' ); ?>" />
				</td>
				<td>
					<label><?php esc_html_e( 'Access expires', 'woocommerce' ); ?></label>
					<input type="text" class="short date-picker" name="access_expires[<?php echo esc_attr( $loop ); ?>]" value="<?php echo ! is_null( $download->get_access_expires() ) ? esc_attr( date_i18n( 'Y-m-d', $download->get_access_expires()->getTimestamp() ) ) : ''; ?>" maxlength="10" placeholder="<?php esc_attr_e( 'Never', 'woocommerce' ); ?>" pattern="<?php echo esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ); ?>" />
				</td>
				<td>
					<label><?php esc_html_e( 'Customer download link', 'woocommerce' ); ?></label>
					<?php
					$download_link = add_query_arg(
						array(
							'download_file' => $download->get_product_id(),
							'order'         => $download->get_order_key(),
							'email'         => urlencode( $download->get_user_email() ),
							'key'           => $download->get_download_id(),
						),
						trailingslashit( home_url() )
					);
					?>
					<a id="copy-download-link" class="button" href="<?php echo esc_url( $download_link ); ?>" data-tip="<?php esc_attr_e( 'Copied!', 'woocommerce' ); ?>" data-tip-failed="<?php esc_attr_e( 'Copying to clipboard failed. You should be able to right-click the button and copy.', 'woocommerce' ); ?>"><?php esc_html_e( 'Copy link', 'woocommerce' ); ?></a>
				</td>
				<td>
					<label><?php esc_html_e( 'Customer download log', 'woocommerce' ); ?></label>
					<?php
					$report_url = add_query_arg(
						'permission_id',
						rawurlencode( $download->get_id() ),
						admin_url( 'admin.php?page=wc-reports&tab=orders&report=downloads' )
					);
					echo '<a class="button" href="' . esc_url( $report_url ) . '">';
					esc_html_e( 'View report', 'woocommerce' );
					echo '</a>';
					?>
				</td>
			</tr>
		</tbody>
	</table>
</div>
html-order-fee.php000064400000007752151557063630010115 0ustar00<?php
/**
 * Shows an order item fee
 *
 * @var object $item The item being displayed
 * @var int $item_id The id of the item being displayed
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<tr class="fee <?php echo ( ! empty( $class ) ) ? esc_attr( $class ) : ''; ?>" data-order_item_id="<?php echo esc_attr( $item_id ); ?>">
	<td class="thumb"><div></div></td>

	<td class="name">
		<div class="view">
			<?php echo esc_html( $item->get_name() ? $item->get_name() : __( 'Fee', 'woocommerce' ) ); ?>
		</div>
		<div class="edit" style="display: none;">
			<input type="text" placeholder="<?php esc_attr_e( 'Fee name', 'woocommerce' ); ?>" name="order_item_name[<?php echo absint( $item_id ); ?>]" value="<?php echo ( $item->get_name() ) ? esc_attr( $item->get_name() ) : ''; ?>" />
			<input type="hidden" class="order_item_id" name="order_item_id[]" value="<?php echo esc_attr( $item_id ); ?>" />
			<input type="hidden" name="order_item_tax_class[<?php echo absint( $item_id ); ?>]" value="<?php echo esc_attr( $item->get_tax_class() ); ?>" />
		</div>
		<?php do_action( 'woocommerce_after_order_fee_item_name', $item_id, $item, null ); ?>
	</td>

	<?php do_action( 'woocommerce_admin_order_item_values', null, $item, absint( $item_id ) ); ?>

	<td class="item_cost" width="1%">&nbsp;</td>
	<td class="quantity" width="1%">&nbsp;</td>

	<td class="line_cost" width="1%">
		<div class="view">
			<?php
			echo wc_price( $item->get_total(), array( 'currency' => $order->get_currency() ) );

			if ( $refunded = -1 * $order->get_total_refunded_for_item( $item_id, 'fee' ) ) {
				echo '<small class="refunded">' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . '</small>';
			}
			?>
		</div>
		<div class="edit" style="display: none;">
			<input type="text" name="line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" value="<?php echo esc_attr( wc_format_localized_price( $item->get_total() ) ); ?>" class="line_total wc_input_price" />
		</div>
		<div class="refund" style="display: none;">
			<input type="text" name="refund_line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" class="refund_line_total wc_input_price" />
		</div>
	</td>

	<?php
	if ( ( $tax_data = $item->get_taxes() ) && wc_tax_enabled() ) {
		foreach ( $order_taxes as $tax_item ) {
			$tax_item_id    = $tax_item->get_rate_id();
			$tax_item_total = isset( $tax_data['total'][ $tax_item_id ] ) ? $tax_data['total'][ $tax_item_id ] : '';
			?>
			<td class="line_tax" width="1%">
				<div class="view">
					<?php
					echo ( '' !== $tax_item_total ) ? wc_price( wc_round_tax_total( $tax_item_total ), array( 'currency' => $order->get_currency() ) ) : '&ndash;';

					if ( $refunded = -1 * $order->get_tax_refunded_for_item( $item_id, $tax_item_id, 'fee' ) ) {
						echo '<small class="refunded">' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . '</small>';
					}
					?>
				</div>
				<div class="edit" style="display: none;">
					<input type="text" name="line_tax[<?php echo absint( $item_id ); ?>][<?php echo esc_attr( $tax_item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" value="<?php echo ( isset( $tax_item_total ) ) ? esc_attr( wc_format_localized_price( $tax_item_total ) ) : ''; ?>" class="line_tax wc_input_price" />
				</div>
				<div class="refund" style="display: none;">
					<input type="text" name="refund_line_tax[<?php echo absint( $item_id ); ?>][<?php echo esc_attr( $tax_item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" class="refund_line_tax wc_input_price" data-tax_id="<?php echo esc_attr( $tax_item_id ); ?>" />
				</div>
			</td>
			<?php
		}
	}
	?>
	<td class="wc-order-edit-line-item">
		<?php if ( $order->is_editable() ) : ?>
			<div class="wc-order-edit-line-item-actions">
				<a class="edit-order-item" href="#"></a><a class="delete-order-item" href="#"></a>
			</div>
		<?php endif; ?>
	</td>
</tr>
html-order-item-meta.php000064400000004364151557063630011234 0ustar00<?php
/**
 * Shows an order item meta
 *
 * @package WooCommerce\Admin
 * @var object $item The item being displayed
 * @var int $item_id The id of the item being displayed
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$hidden_order_itemmeta = apply_filters(
	'woocommerce_hidden_order_itemmeta',
	array(
		'_qty',
		'_tax_class',
		'_product_id',
		'_variation_id',
		'_line_subtotal',
		'_line_subtotal_tax',
		'_line_total',
		'_line_tax',
		'method_id',
		'cost',
		'_reduced_stock',
		'_restock_refunded_items',
	)
);
?><div class="view">
	<?php
	$meta_data = $item->get_all_formatted_meta_data( '' );
	if ( $meta_data ) :
		?>
		<table cellspacing="0" class="display_meta">
			<?php
			foreach ( $meta_data as $meta_id => $meta ) :
				if ( in_array( $meta->key, $hidden_order_itemmeta, true ) ) {
					continue;
				}
				?>
				<tr>
					<th><?php echo wp_kses_post( $meta->display_key ); ?>:</th>
					<td><?php echo wp_kses_post( force_balance_tags( $meta->display_value ) ); ?></td>
				</tr>
			<?php endforeach; ?>
		</table>
	<?php endif; ?>
</div>
<div class="edit" style="display: none;">
	<table class="meta" cellspacing="0">
		<tbody class="meta_items">
			<?php if ( $meta_data ) : ?>
				<?php
				foreach ( $meta_data as $meta_id => $meta ) :
					if ( in_array( $meta->key, $hidden_order_itemmeta, true ) ) {
						continue;
					}
					?>
					<tr data-meta_id="<?php echo esc_attr( $meta_id ); ?>">
						<td>
							<input type="text" maxlength="255" placeholder="<?php esc_attr_e( 'Name (required)', 'woocommerce' ); ?>" name="meta_key[<?php echo esc_attr( $item_id ); ?>][<?php echo esc_attr( $meta_id ); ?>]" value="<?php echo esc_attr( $meta->key ); ?>" />
							<textarea placeholder="<?php esc_attr_e( 'Value (required)', 'woocommerce' ); ?>" name="meta_value[<?php echo esc_attr( $item_id ); ?>][<?php echo esc_attr( $meta_id ); ?>]"><?php echo esc_textarea( rawurldecode( $meta->value ) ); ?></textarea>
						</td>
						<td width="1%"><button class="remove_order_item_meta button">&times;</button></td>
					</tr>
				<?php endforeach; ?>
			<?php endif; ?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="4"><button class="add_order_item_meta button"><?php esc_html_e( 'Add&nbsp;meta', 'woocommerce' ); ?></button></td>
			</tr>
		</tfoot>
	</table>
</div>
html-order-item.php000064400000024750151557063630010311 0ustar00<?php
/**
 * Shows an order item
 *
 * @package WooCommerce\Admin
 * @var WC_Order_Item $item The item being displayed
 * @var int $item_id The id of the item being displayed
 */

defined( 'ABSPATH' ) || exit;

$product      = $item->get_product();
$product_link = $product ? admin_url( 'post.php?post=' . $item->get_product_id() . '&action=edit' ) : '';
$thumbnail    = $product ? apply_filters( 'woocommerce_admin_order_item_thumbnail', $product->get_image( 'thumbnail', array( 'title' => '' ), false ), $item_id, $item ) : '';
$row_class    = apply_filters( 'woocommerce_admin_html_order_item_class', ! empty( $class ) ? $class : '', $item, $order );
?>
<tr class="item <?php echo esc_attr( $row_class ); ?>" data-order_item_id="<?php echo esc_attr( $item_id ); ?>">
	<td class="thumb">
		<?php echo '<div class="wc-order-item-thumbnail">' . wp_kses_post( $thumbnail ) . '</div>'; ?>
	</td>
	<td class="name" data-sort-value="<?php echo esc_attr( $item->get_name() ); ?>">
		<?php
		echo $product_link ? '<a href="' . esc_url( $product_link ) . '" class="wc-order-item-name">' . wp_kses_post( $item->get_name() ) . '</a>' : '<div class="wc-order-item-name">' . wp_kses_post( $item->get_name() ) . '</div>';

		if ( $product && $product->get_sku() ) {
			echo '<div class="wc-order-item-sku"><strong>' . esc_html__( 'SKU:', 'woocommerce' ) . '</strong> ' . esc_html( $product->get_sku() ) . '</div>';
		}

		if ( $item->get_variation_id() ) {
			echo '<div class="wc-order-item-variation"><strong>' . esc_html__( 'Variation ID:', 'woocommerce' ) . '</strong> ';
			if ( 'product_variation' === get_post_type( $item->get_variation_id() ) ) {
				echo esc_html( $item->get_variation_id() );
			} else {
				/* translators: %s: variation id */
				printf( esc_html__( '%s (No longer exists)', 'woocommerce' ), esc_html( $item->get_variation_id() ) );
			}
			echo '</div>';
		}
		?>
		<input type="hidden" class="order_item_id" name="order_item_id[]" value="<?php echo esc_attr( $item_id ); ?>" />
		<input type="hidden" name="order_item_tax_class[<?php echo absint( $item_id ); ?>]" value="<?php echo esc_attr( $item->get_tax_class() ); ?>" />

		<?php do_action( 'woocommerce_before_order_itemmeta', $item_id, $item, $product ); ?>
		<?php require __DIR__ . '/html-order-item-meta.php'; ?>
		<?php do_action( 'woocommerce_after_order_itemmeta', $item_id, $item, $product ); ?>
	</td>

	<?php do_action( 'woocommerce_admin_order_item_values', $product, $item, absint( $item_id ) ); ?>

	<td class="item_cost" width="1%" data-sort-value="<?php echo esc_attr( $order->get_item_subtotal( $item, false, true ) ); ?>">
		<div class="view">
			<?php
			echo wc_price( $order->get_item_subtotal( $item, false, true ), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
			?>
		</div>
	</td>
	<td class="quantity" width="1%">
		<div class="view">
			<?php
			echo '<small class="times">&times;</small> ' . esc_html( $item->get_quantity() );

			$refunded_qty = -1 * $order->get_qty_refunded_for_item( $item_id );

			if ( $refunded_qty ) {
				echo '<small class="refunded">' . esc_html( $refunded_qty * -1 ) . '</small>';
			}
			?>
		</div>
		<?php
			$step = apply_filters( 'woocommerce_quantity_input_step', '1', $product );

			/**
			* Filter to change the product quantity stepping in the order editor of the admin area.
			*
			* @since   5.8.0
			* @param   string      $step    The current step amount to be used in the quantity editor.
			* @param   WC_Product  $product The product that is being edited.
			* @param   string      $context The context in which the quantity editor is shown, 'edit' or 'refund'.
			*/
			$step_edit   = apply_filters( 'woocommerce_quantity_input_step_admin', $step, $product, 'edit' );
			$step_refund = apply_filters( 'woocommerce_quantity_input_step_admin', $step, $product, 'refund' );

			/**
			* Filter to change the product quantity minimum in the order editor of the admin area.
			*
			* @since   5.8.0
			* @param   string      $step    The current minimum amount to be used in the quantity editor.
			* @param   WC_Product  $product The product that is being edited.
			* @param   string      $context The context in which the quantity editor is shown, 'edit' or 'refund'.
			*/
			$min_edit   = apply_filters( 'woocommerce_quantity_input_min_admin', '0', $product, 'edit' );
			$min_refund = apply_filters( 'woocommerce_quantity_input_min_admin', '0', $product, 'refund' );
		?>
		<div class="edit" style="display: none;">
			<input type="number" step="<?php echo esc_attr( $step_edit ); ?>" min="<?php echo esc_attr( $min_edit ); ?>" autocomplete="off" name="order_item_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" value="<?php echo esc_attr( $item->get_quantity() ); ?>" data-qty="<?php echo esc_attr( $item->get_quantity() ); ?>" size="4" class="quantity" />
		</div>
		<div class="refund" style="display: none;">
			<input type="number" step="<?php echo esc_attr( $step_refund ); ?>" min="<?php echo esc_attr( $min_refund ); ?>" max="<?php echo absint( $item->get_quantity() ); ?>" autocomplete="off" name="refund_order_item_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" size="4" class="refund_order_item_qty" />
		</div>
	</td>
	<td class="line_cost" width="1%" data-sort-value="<?php echo esc_attr( $item->get_total() ); ?>">
		<div class="view">
			<?php
			echo wc_price( $item->get_total(), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped

			if ( $item->get_subtotal() !== $item->get_total() ) {
				/* translators: %s: discount amount */
				echo '<span class="wc-order-item-discount">' . sprintf( esc_html__( '%s discount', 'woocommerce' ), wc_price( wc_format_decimal( $item->get_subtotal() - $item->get_total(), '' ), array( 'currency' => $order->get_currency() ) ) ) . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
			}

			$refunded = -1 * $order->get_total_refunded_for_item( $item_id );

			if ( $refunded ) {
				echo '<small class="refunded">' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . '</small>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
			}
			?>
		</div>
		<div class="edit" style="display: none;">
			<div class="split-input">
				<div class="input">
					<label><?php esc_attr_e( 'Before discount', 'woocommerce' ); ?></label>
					<input type="text" name="line_subtotal[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" value="<?php echo esc_attr( wc_format_localized_price( $item->get_subtotal() ) ); ?>" class="line_subtotal wc_input_price" data-subtotal="<?php echo esc_attr( wc_format_localized_price( $item->get_subtotal() ) ); ?>" />
				</div>
				<div class="input">
					<label><?php esc_attr_e( 'Total', 'woocommerce' ); ?></label>
					<input type="text" name="line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" value="<?php echo esc_attr( wc_format_localized_price( $item->get_total() ) ); ?>" class="line_total wc_input_price" data-tip="<?php esc_attr_e( 'After pre-tax discounts.', 'woocommerce' ); ?>" data-total="<?php echo esc_attr( wc_format_localized_price( $item->get_total() ) ); ?>" />
				</div>
			</div>
		</div>
		<div class="refund" style="display: none;">
			<input type="text" name="refund_line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" class="refund_line_total wc_input_price" />
		</div>
	</td>

	<?php
	$tax_data = wc_tax_enabled() ? $item->get_taxes() : false;

	if ( $tax_data ) {
		foreach ( $order_taxes as $tax_item ) {
			$tax_item_id       = $tax_item->get_rate_id();
			$tax_item_total    = isset( $tax_data['total'][ $tax_item_id ] ) ? $tax_data['total'][ $tax_item_id ] : '';
			$tax_item_subtotal = isset( $tax_data['subtotal'][ $tax_item_id ] ) ? $tax_data['subtotal'][ $tax_item_id ] : '';

			?>
			<td class="line_tax" width="1%">
				<div class="view">
					<?php
					if ( '' !== $tax_item_total ) {
						echo wc_price( wc_round_tax_total( $tax_item_total ), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
					} else {
						echo '&ndash;';
					}

					$refunded = -1 * $order->get_tax_refunded_for_item( $item_id, $tax_item_id );

					if ( $refunded ) {
						echo '<small class="refunded">' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . '</small>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
					}
					?>
				</div>
				<div class="edit" style="display: none;">
					<div class="split-input">
						<div class="input">
							<label><?php esc_attr_e( 'Before discount', 'woocommerce' ); ?></label>
							<input type="text" name="line_subtotal_tax[<?php echo absint( $item_id ); ?>][<?php echo esc_attr( $tax_item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" value="<?php echo esc_attr( wc_format_localized_price( $tax_item_subtotal ) ); ?>" class="line_subtotal_tax wc_input_price" data-subtotal_tax="<?php echo esc_attr( wc_format_localized_price( $tax_item_subtotal ) ); ?>" data-tax_id="<?php echo esc_attr( $tax_item_id ); ?>" />
						</div>
						<div class="input">
							<label><?php esc_attr_e( 'Total', 'woocommerce' ); ?></label>
							<input type="text" name="line_tax[<?php echo absint( $item_id ); ?>][<?php echo esc_attr( $tax_item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" value="<?php echo esc_attr( wc_format_localized_price( $tax_item_total ) ); ?>" class="line_tax wc_input_price" data-total_tax="<?php echo esc_attr( wc_format_localized_price( $tax_item_total ) ); ?>" data-tax_id="<?php echo esc_attr( $tax_item_id ); ?>" />
						</div>
					</div>
				</div>
				<div class="refund" style="display: none;">
					<input type="text" name="refund_line_tax[<?php echo absint( $item_id ); ?>][<?php echo esc_attr( $tax_item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" class="refund_line_tax wc_input_price" data-tax_id="<?php echo esc_attr( $tax_item_id ); ?>" />
				</div>
			</td>
			<?php
		}
	}
	?>
	<td class="wc-order-edit-line-item" width="1%">
		<div class="wc-order-edit-line-item-actions">
			<?php if ( $order->is_editable() ) : ?>
				<a class="edit-order-item tips" href="#" data-tip="<?php esc_attr_e( 'Edit item', 'woocommerce' ); ?>"></a><a class="delete-order-item tips" href="#" data-tip="<?php esc_attr_e( 'Delete item', 'woocommerce' ); ?>"></a>
			<?php endif; ?>
		</div>
	</td>
</tr>
html-order-items.php000064400000052401151557063630010466 0ustar00<?php
/**
 * Order items HTML for meta box.
 *
 * @package WooCommerce\Admin
 */

defined( 'ABSPATH' ) || exit;

/**
 * Allow plugins to determine whether refunds UI should be rendered in the template.
 *
 * @since 6.4.0
 *
 * @param bool     $render_refunds If the refunds UI should be rendered.
 * @param int      $order_id       The Order ID.
 * @param WC_Order $order          The Order object.
 */
$render_refunds = (bool) apply_filters( 'woocommerce_admin_order_should_render_refunds', 0 < $order->get_total() - $order->get_total_refunded() || 0 < absint( $order->get_item_count() - $order->get_item_count_refunded() ), $order->get_id(), $order );

global $wpdb;

$payment_gateway     = wc_get_payment_gateway_by_order( $order );
$line_items          = $order->get_items( apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) );
$discounts           = $order->get_items( 'discount' );
$line_items_fee      = $order->get_items( 'fee' );
$line_items_shipping = $order->get_items( 'shipping' );

if ( wc_tax_enabled() ) {
	$order_taxes      = $order->get_taxes();
	$tax_classes      = WC_Tax::get_tax_classes();
	$classes_options  = wc_get_product_tax_class_options();
	$show_tax_columns = count( $order_taxes ) === 1;
}
?>
<div class="woocommerce_order_items_wrapper wc-order-items-editable">
	<table cellpadding="0" cellspacing="0" class="woocommerce_order_items">
		<thead>
			<tr>
				<th class="item sortable" colspan="2" data-sort="string-ins"><?php esc_html_e( 'Item', 'woocommerce' ); ?></th>
				<?php do_action( 'woocommerce_admin_order_item_headers', $order ); ?>
				<th class="item_cost sortable" data-sort="float"><?php esc_html_e( 'Cost', 'woocommerce' ); ?></th>
				<th class="quantity sortable" data-sort="int"><?php esc_html_e( 'Qty', 'woocommerce' ); ?></th>
				<th class="line_cost sortable" data-sort="float"><?php esc_html_e( 'Total', 'woocommerce' ); ?></th>
				<?php
				if ( ! empty( $order_taxes ) ) :
					foreach ( $order_taxes as $tax_id => $tax_item ) :
						$tax_class      = wc_get_tax_class_by_tax_id( $tax_item['rate_id'] );
						$tax_class_name = isset( $classes_options[ $tax_class ] ) ? $classes_options[ $tax_class ] : __( 'Tax', 'woocommerce' );
						$column_label   = ! empty( $tax_item['label'] ) ? $tax_item['label'] : __( 'Tax', 'woocommerce' );
						/* translators: %1$s: tax item name %2$s: tax class name  */
						$column_tip = sprintf( esc_html__( '%1$s (%2$s)', 'woocommerce' ), $tax_item['name'], $tax_class_name );
						?>
						<th class="line_tax tips" data-tip="<?php echo esc_attr( $column_tip ); ?>">
							<?php echo esc_attr( $column_label ); ?>
							<input type="hidden" class="order-tax-id" name="order_taxes[<?php echo esc_attr( $tax_id ); ?>]" value="<?php echo esc_attr( $tax_item['rate_id'] ); ?>">
							<?php if ( $order->is_editable() ) : ?>
								<a class="delete-order-tax" href="#" data-rate_id="<?php echo esc_attr( $tax_id ); ?>"></a>
							<?php endif; ?>
						</th>
						<?php
					endforeach;
				endif;
				?>
				<th class="wc-order-edit-line-item" width="1%">&nbsp;</th>
			</tr>
		</thead>
		<tbody id="order_line_items">
			<?php
			foreach ( $line_items as $item_id => $item ) {
				do_action( 'woocommerce_before_order_item_' . $item->get_type() . '_html', $item_id, $item, $order );

				include __DIR__ . '/html-order-item.php';

				do_action( 'woocommerce_order_item_' . $item->get_type() . '_html', $item_id, $item, $order );
			}
			do_action( 'woocommerce_admin_order_items_after_line_items', $order->get_id() );
			?>
		</tbody>
		<tbody id="order_fee_line_items">
			<?php
			foreach ( $line_items_fee as $item_id => $item ) {
				include __DIR__ . '/html-order-fee.php';
			}
			do_action( 'woocommerce_admin_order_items_after_fees', $order->get_id() );
			?>
		</tbody>
		<tbody id="order_shipping_line_items">
			<?php
			$shipping_methods = WC()->shipping() ? WC()->shipping()->load_shipping_methods() : array();
			foreach ( $line_items_shipping as $item_id => $item ) {
				include __DIR__ . '/html-order-shipping.php';
			}
			do_action( 'woocommerce_admin_order_items_after_shipping', $order->get_id() );
			?>
		</tbody>
		<tbody id="order_refunds">
			<?php
			$refunds = $order->get_refunds();

			if ( $refunds ) {
				foreach ( $refunds as $refund ) {
					include __DIR__ . '/html-order-refund.php';
				}
				do_action( 'woocommerce_admin_order_items_after_refunds', $order->get_id() );
			}
			?>
		</tbody>
	</table>
</div>
<div class="wc-order-data-row wc-order-totals-items wc-order-items-editable">
	<?php
	$coupons = $order->get_items( 'coupon' );
	if ( $coupons ) :
		?>
		<div class="wc-used-coupons">
			<ul class="wc_coupon_list">
				<li><strong><?php esc_html_e( 'Coupon(s)', 'woocommerce' ); ?></strong></li>
				<?php
				foreach ( $coupons as $item_id => $item ) :
					$post_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_title = %s AND post_type = 'shop_coupon' AND post_status = 'publish' LIMIT 1;", $item->get_code() ) ); // phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited
					$class   = $order->is_editable() ? 'code editable' : 'code';
					?>
					<li class="<?php echo esc_attr( $class ); ?>">
						<?php if ( $post_id ) : ?>
							<?php
							$post_url = apply_filters(
								'woocommerce_admin_order_item_coupon_url',
								add_query_arg(
									array(
										'post'   => $post_id,
										'action' => 'edit',
									),
									admin_url( 'post.php' )
								),
								$item,
								$order
							);
							?>
							<a href="<?php echo esc_url( $post_url ); ?>" class="tips" data-tip="<?php echo esc_attr( wc_price( $item->get_discount(), array( 'currency' => $order->get_currency() ) ) ); ?>">
								<span><?php echo esc_html( $item->get_code() ); ?></span>
							</a>
						<?php else : ?>
							<span class="tips" data-tip="<?php echo esc_attr( wc_price( $item->get_discount(), array( 'currency' => $order->get_currency() ) ) ); ?>">
								<span><?php echo esc_html( $item->get_code() ); ?></span>
							</span>
						<?php endif; ?>
						<?php if ( $order->is_editable() ) : ?>
							<a class="remove-coupon" href="javascript:void(0)" aria-label="Remove" data-code="<?php echo esc_attr( $item->get_code() ); ?>"></a>
						<?php endif; ?>
					</li>
				<?php endforeach; ?>
			</ul>
		</div>
	<?php endif; ?>
	<table class="wc-order-totals">
			<tr>
				<td class="label"><?php esc_html_e( 'Items Subtotal:', 'woocommerce' ); ?></td>
				<td width="1%"></td>
				<td class="total">
					<?php echo wc_price( $order->get_subtotal(), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
				</td>
			</tr>
		<?php if ( 0 < $order->get_total_discount() ) : ?>
			<tr>
				<td class="label"><?php esc_html_e( 'Coupon(s):', 'woocommerce' ); ?></td>
				<td width="1%"></td>
				<td class="total">-
					<?php echo wc_price( $order->get_total_discount(), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
				</td>
			</tr>
		<?php endif; ?>
		<?php if ( 0 < $order->get_total_fees() ) : ?>
			<tr>
				<td class="label"><?php esc_html_e( 'Fees:', 'woocommerce' ); ?></td>
				<td width="1%"></td>
				<td class="total">
					<?php echo wc_price( $order->get_total_fees(), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
				</td>
			</tr>
		<?php endif; ?>

		<?php do_action( 'woocommerce_admin_order_totals_after_discount', $order->get_id() ); ?>

		<?php if ( $order->get_shipping_methods() ) : ?>
			<tr>
				<td class="label"><?php esc_html_e( 'Shipping:', 'woocommerce' ); ?></td>
				<td width="1%"></td>
				<td class="total">
					<?php echo wc_price( $order->get_shipping_total(), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
				</td>
			</tr>
		<?php endif; ?>

		<?php do_action( 'woocommerce_admin_order_totals_after_shipping', $order->get_id() ); ?>

		<?php if ( wc_tax_enabled() ) : ?>
			<?php foreach ( $order->get_tax_totals() as $code => $tax_total ) : ?>
				<tr>
					<td class="label"><?php echo esc_html( $tax_total->label ); ?>:</td>
					<td width="1%"></td>
					<td class="total">
						<?php
							// We use wc_round_tax_total here because tax may need to be round up or round down depending upon settings, whereas wc_price alone will always round it down.
							echo wc_price( wc_round_tax_total( $tax_total->amount ), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
						?>
					</td>
				</tr>
			<?php endforeach; ?>
		<?php endif; ?>

		<?php do_action( 'woocommerce_admin_order_totals_after_tax', $order->get_id() ); ?>

		<tr>
			<td class="label"><?php esc_html_e( 'Order Total', 'woocommerce' ); ?>:</td>
			<td width="1%"></td>
			<td class="total">
				<?php echo wc_price( $order->get_total(), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
			</td>
		</tr>

	</table>

	<div class="clear"></div>

	<?php if ( in_array( $order->get_status(), array( 'processing', 'completed', 'refunded' ), true ) && ! empty( $order->get_date_paid() ) ) : ?>

		<table class="wc-order-totals" style="border-top: 1px solid #999; margin-top:12px; padding-top:12px">
			<tr>
				<td class="<?php echo $order->get_total_refunded() ? 'label' : 'label label-highlight'; ?>"><?php esc_html_e( 'Paid', 'woocommerce' ); ?>: <br /></td>
				<td width="1%"></td>
				<td class="total">
					<?php echo wc_price( $order->get_total(), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
				</td>
			</tr>
			<tr>
				<td>
					<span class="description">
					<?php
					if ( $order->get_payment_method_title() ) {
						/* translators: 1: payment date. 2: payment method */
						echo esc_html( sprintf( __( '%1$s via %2$s', 'woocommerce' ), $order->get_date_paid()->date_i18n( get_option( 'date_format' ) ), $order->get_payment_method_title() ) );
					} else {
						echo esc_html( $order->get_date_paid()->date_i18n( get_option( 'date_format' ) ) );
					}
					?>
					</span>
				</td>
				<td colspan="2"></td>
			</tr>
		</table>

	<div class="clear"></div>

	<?php endif; ?>

	<?php if ( $order->get_total_refunded() ) : ?>
		<table class="wc-order-totals" style="border-top: 1px solid #999; margin-top:12px; padding-top:12px">
			<tr>
				<td class="label refunded-total"><?php esc_html_e( 'Refunded', 'woocommerce' ); ?>:</td>
				<td width="1%"></td>
				<td class="total refunded-total">-<?php echo wc_price( $order->get_total_refunded(), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td>
			</tr>

			<?php do_action( 'woocommerce_admin_order_totals_after_refunded', $order->get_id() ); ?>

			<tr>
				<td class="label label-highlight"><?php esc_html_e( 'Net Payment', 'woocommerce' ); ?>:</td>
				<td width="1%"></td>
				<td class="total">
				<?php echo wc_price( $order->get_total() - $order->get_total_refunded(), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
				</td>
			</tr>

		</table>
	<?php endif; ?>

	<div class="clear"></div>

	<table class="wc-order-totals">
		<?php do_action( 'woocommerce_admin_order_totals_after_total', $order->get_id() ); ?>
	</table>

	<div class="clear"></div>
</div>
<div class="wc-order-data-row wc-order-bulk-actions wc-order-data-row-toggle">
	<p class="add-items">
		<?php if ( $order->is_editable() ) : ?>
			<button type="button" class="button add-line-item"><?php esc_html_e( 'Add item(s)', 'woocommerce' ); ?></button>
			<?php if ( wc_coupons_enabled() ) : ?>
				<button type="button" class="button add-coupon"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>
			<?php endif; ?>
		<?php else : ?>
			<span class="description"><?php echo wc_help_tip( __( 'To edit this order change the status back to "Pending payment"', 'woocommerce' ) ); ?> <?php esc_html_e( 'This order is no longer editable.', 'woocommerce' ); ?></span>
		<?php endif; ?>
		<?php if ( $render_refunds ) : ?>
			<button type="button" class="button refund-items"><?php esc_html_e( 'Refund', 'woocommerce' ); ?></button>
		<?php endif; ?>
		<?php
			// Allow adding custom buttons.
			do_action( 'woocommerce_order_item_add_action_buttons', $order );
		?>
		<?php if ( $order->is_editable() ) : ?>
			<button type="button" class="button button-primary calculate-action"><?php esc_html_e( 'Recalculate', 'woocommerce' ); ?></button>
		<?php endif; ?>
	</p>
</div>
<div class="wc-order-data-row wc-order-add-item wc-order-data-row-toggle" style="display:none;">
	<button type="button" class="button add-order-item"><?php esc_html_e( 'Add product(s)', 'woocommerce' ); ?></button>
	<button type="button" class="button add-order-fee"><?php esc_html_e( 'Add fee', 'woocommerce' ); ?></button>
	<button type="button" class="button add-order-shipping"><?php esc_html_e( 'Add shipping', 'woocommerce' ); ?></button>
	<?php if ( wc_tax_enabled() ) : ?>
		<button type="button" class="button add-order-tax"><?php esc_html_e( 'Add tax', 'woocommerce' ); ?></button>
	<?php endif; ?>
	<?php
		// Allow adding custom buttons.
		do_action( 'woocommerce_order_item_add_line_buttons', $order );
	?>
	<button type="button" class="button cancel-action"><?php esc_html_e( 'Cancel', 'woocommerce' ); ?></button>
	<button type="button" class="button button-primary save-action"><?php esc_html_e( 'Save', 'woocommerce' ); ?></button>
</div>
<?php if ( $render_refunds ) : ?>
<div class="wc-order-data-row wc-order-refund-items wc-order-data-row-toggle" style="display: none;">
	<table class="wc-order-totals">
		<?php if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) : ?>
			<tr>
				<td class="label"><label for="restock_refunded_items"><?php esc_html_e( 'Restock refunded items', 'woocommerce' ); ?>:</label></td>
				<td class="total"><input type="checkbox" id="restock_refunded_items" name="restock_refunded_items" <?php checked( apply_filters( 'woocommerce_restock_refunded_items', true ) ); ?> /></td>
			</tr>
		<?php endif; ?>
		<tr>
			<td class="label"><?php esc_html_e( 'Amount already refunded', 'woocommerce' ); ?>:</td>
			<td class="total">-<?php echo wc_price( $order->get_total_refunded(), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td>
		</tr>
		<tr>
			<td class="label"><?php esc_html_e( 'Total available to refund', 'woocommerce' ); ?>:</td>
			<td class="total"><?php echo wc_price( $order->get_total() - $order->get_total_refunded(), array( 'currency' => $order->get_currency() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td>
		</tr>
		<tr>
			<td class="label">
				<label for="refund_amount">
					<?php echo wc_help_tip( __( 'Refund the line items above. This will show the total amount to be refunded', 'woocommerce' ) ); ?>
					<?php esc_html_e( 'Refund amount', 'woocommerce' ); ?>:
				</label>
			</td>
			<td class="total">
				<input type="text" id="refund_amount" name="refund_amount" class="wc_input_price"
				<?php
				if ( wc_tax_enabled() ) {
					// If taxes are enabled, using this refund amount can cause issues due to taxes not being refunded also.
					// The refunds should be added to the line items, not the order as a whole.
					echo 'readonly';
				}
				?>
				/>
				<div class="clear"></div>
			</td>
		</tr>
		<tr>
			<td class="label">
				<label for="refund_reason">
					<?php echo wc_help_tip( __( 'Note: the refund reason will be visible by the customer.', 'woocommerce' ) ); ?>
					<?php esc_html_e( 'Reason for refund (optional):', 'woocommerce' ); ?>
				</label>
			</td>
			<td class="total">
				<input type="text" id="refund_reason" name="refund_reason" />
				<div class="clear"></div>
			</td>
		</tr>
	</table>
	<div class="clear"></div>
	<div class="refund-actions">
		<?php
		$refund_amount = '<span class="wc-order-refund-amount">' . wc_price( 0, array( 'currency' => $order->get_currency() ) ) . '</span>';
		$gateway_name  = false !== $payment_gateway ? ( ! empty( $payment_gateway->method_title ) ? $payment_gateway->method_title : $payment_gateway->get_title() ) : __( 'Payment gateway', 'woocommerce' );

		if ( false !== $payment_gateway && $payment_gateway->can_refund_order( $order ) ) {
			/* translators: refund amount, gateway name */
			echo '<button type="button" class="button button-primary do-api-refund">' . sprintf( esc_html__( 'Refund %1$s via %2$s', 'woocommerce' ), wp_kses_post( $refund_amount ), esc_html( $gateway_name ) ) . '</button>';
		}
		?>
		<?php /* translators: refund amount  */ ?>
		<button type="button" class="button button-primary do-manual-refund tips" data-tip="<?php esc_attr_e( 'You will need to manually issue a refund through your payment gateway after using this.', 'woocommerce' ); ?>"><?php printf( esc_html__( 'Refund %s manually', 'woocommerce' ), wp_kses_post( $refund_amount ) ); ?></button>
		<button type="button" class="button cancel-action"><?php esc_html_e( 'Cancel', 'woocommerce' ); ?></button>
		<input type="hidden" id="refunded_amount" name="refunded_amount" value="<?php echo esc_attr( $order->get_total_refunded() ); ?>" />
		<div class="clear"></div>
	</div>
</div>
<?php endif; ?>

<script type="text/template" id="tmpl-wc-modal-add-products">
	<div class="wc-backbone-modal">
		<div class="wc-backbone-modal-content">
			<section class="wc-backbone-modal-main" role="main">
				<header class="wc-backbone-modal-header">
					<h1><?php esc_html_e( 'Add products', 'woocommerce' ); ?></h1>
					<button class="modal-close modal-close-link dashicons dashicons-no-alt">
						<span class="screen-reader-text">Close modal panel</span>
					</button>
				</header>
				<article>
					<form action="" method="post">
						<table class="widefat">
							<thead>
								<tr>
									<th><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
									<th><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>
								</tr>
							</thead>
							<?php
								$row = '
									<td><select class="wc-product-search" name="item_id" data-allow_clear="true" data-display_stock="true" data-exclude_type="variable" data-placeholder="' . esc_attr__( 'Search for a product&hellip;', 'woocommerce' ) . '"></select></td>
									<td><input type="number" step="1" min="0" max="9999" autocomplete="off" name="item_qty" placeholder="1" size="4" class="quantity" /></td>';
							?>
							<tbody data-row="<?php echo esc_attr( $row ); ?>">
								<tr>
									<?php echo $row; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
								</tr>
							</tbody>
						</table>
					</form>
				</article>
				<footer>
					<div class="inner">
						<button id="btn-ok" class="button button-primary button-large"><?php esc_html_e( 'Add', 'woocommerce' ); ?></button>
					</div>
				</footer>
			</section>
		</div>
	</div>
	<div class="wc-backbone-modal-backdrop modal-close"></div>
</script>

<script type="text/template" id="tmpl-wc-modal-add-tax">
	<div class="wc-backbone-modal">
		<div class="wc-backbone-modal-content">
			<section class="wc-backbone-modal-main" role="main">
				<header class="wc-backbone-modal-header">
					<h1><?php esc_html_e( 'Add tax', 'woocommerce' ); ?></h1>
					<button class="modal-close modal-close-link dashicons dashicons-no-alt">
						<span class="screen-reader-text">Close modal panel</span>
					</button>
				</header>
				<article>
					<form action="" method="post">
						<table class="widefat">
							<thead>
								<tr>
									<th>&nbsp;</th>
									<th><?php esc_html_e( 'Rate name', 'woocommerce' ); ?></th>
									<th><?php esc_html_e( 'Tax class', 'woocommerce' ); ?></th>
									<th><?php esc_html_e( 'Rate code', 'woocommerce' ); ?></th>
									<th><?php esc_html_e( 'Rate %', 'woocommerce' ); ?></th>
								</tr>
							</thead>
						<?php
						$rates = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}woocommerce_tax_rates ORDER BY tax_rate_name LIMIT 100" );
						foreach ( $rates as $rate ) {
							echo '
									<tr>
										<td><input type="radio" id="add_order_tax_' . absint( $rate->tax_rate_id ) . '" name="add_order_tax" value="' . absint( $rate->tax_rate_id ) . '" /></td>
										<td><label for="add_order_tax_' . absint( $rate->tax_rate_id ) . '">' . esc_html( WC_Tax::get_rate_label( $rate ) ) . '</label></td>
										<td>' . ( isset( $classes_options[ $rate->tax_rate_class ] ) ? esc_html( $classes_options[ $rate->tax_rate_class ] ) : '-' ) . '</td>
										<td>' . esc_html( WC_Tax::get_rate_code( $rate ) ) . '</td>
										<td>' . esc_html( WC_Tax::get_rate_percent( $rate ) ) . '</td>
									</tr>
								';
						}
						?>
						</table>
						<?php if ( absint( $wpdb->get_var( "SELECT COUNT(tax_rate_id) FROM {$wpdb->prefix}woocommerce_tax_rates;" ) ) > 100 ) : ?>
							<p>
								<label for="manual_tax_rate_id"><?php esc_html_e( 'Or, enter tax rate ID:', 'woocommerce' ); ?></label><br/>
								<input type="number" name="manual_tax_rate_id" id="manual_tax_rate_id" step="1" placeholder="<?php esc_attr_e( 'Optional', 'woocommerce' ); ?>" />
							</p>
						<?php endif; ?>
					</form>
				</article>
				<footer>
					<div class="inner">
						<button id="btn-ok" class="button button-primary button-large"><?php esc_html_e( 'Add', 'woocommerce' ); ?></button>
					</div>
				</footer>
			</section>
		</div>
	</div>
	<div class="wc-backbone-modal-backdrop modal-close"></div>
</script>
html-order-notes.php000064400000003076151557063630010501 0ustar00<?php
/**
 * Order notes HTML for meta box.
 *
 * @package WooCommerce\Admin
 */

defined( 'ABSPATH' ) || exit;

?>
<ul class="order_notes">
	<?php
	if ( $notes ) {
		foreach ( $notes as $note ) {
			$css_class   = array( 'note' );
			$css_class[] = $note->customer_note ? 'customer-note' : '';
			$css_class[] = 'system' === $note->added_by ? 'system-note' : '';
			$css_class   = apply_filters( 'woocommerce_order_note_class', array_filter( $css_class ), $note );
			?>
			<li rel="<?php echo absint( $note->id ); ?>" class="<?php echo esc_attr( implode( ' ', $css_class ) ); ?>">
				<div class="note_content">
					<?php echo wpautop( wptexturize( wp_kses_post( $note->content ) ) ); // @codingStandardsIgnoreLine ?>
				</div>
				<p class="meta">
					<abbr class="exact-date" title="<?php echo esc_attr( $note->date_created->date( 'Y-m-d H:i:s' ) ); ?>">
						<?php
						/* translators: %1$s: note date %2$s: note time */
						echo esc_html( sprintf( __( '%1$s at %2$s', 'woocommerce' ), $note->date_created->date_i18n( wc_date_format() ), $note->date_created->date_i18n( wc_time_format() ) ) );
						?>
					</abbr>
					<?php
					if ( 'system' !== $note->added_by ) :
						/* translators: %s: note author */
						echo esc_html( sprintf( ' ' . __( 'by %s', 'woocommerce' ), $note->added_by ) );
					endif;
					?>
					<a href="#" class="delete_note" role="button"><?php esc_html_e( 'Delete note', 'woocommerce' ); ?></a>
				</p>
			</li>
			<?php
		}
	} else {
		?>
		<li class="no-items"><?php esc_html_e( 'There are no notes yet.', 'woocommerce' ); ?></li>
		<?php
	}
	?>
</ul>
html-order-refund.php000064400000004655151557063630010640 0ustar00<?php
/**
 * Show order refund
 *
 * @var object $refund The refund object.
 * @package WooCommerce\Admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

$who_refunded = new WP_User( $refund->get_refunded_by() );
?>
<tr class="refund <?php echo ( ! empty( $class ) ) ? esc_attr( $class ) : ''; ?>" data-order_refund_id="<?php echo esc_attr( $refund->get_id() ); ?>">
	<td class="thumb"><div></div></td>

	<td class="name">
		<?php
		if ( $who_refunded->exists() ) {
			printf(
				/* translators: 1: refund id 2: refund date 3: username */
				esc_html__( 'Refund #%1$s - %2$s by %3$s', 'woocommerce' ),
				esc_html( $refund->get_id() ),
				esc_html( wc_format_datetime( $refund->get_date_created(), get_option( 'date_format' ) . ', ' . get_option( 'time_format' ) ) ),
				sprintf(
					'<abbr class="refund_by" title="%1$s">%2$s</abbr>',
					/* translators: 1: ID who refunded */
					sprintf( esc_attr__( 'ID: %d', 'woocommerce' ), absint( $who_refunded->ID ) ),
					esc_html( $who_refunded->display_name )
				)
			);
		} else {
			printf(
				/* translators: 1: refund id 2: refund date */
				esc_html__( 'Refund #%1$s - %2$s', 'woocommerce' ),
				esc_html( $refund->get_id() ),
				esc_html( wc_format_datetime( $refund->get_date_created(), get_option( 'date_format' ) . ', ' . get_option( 'time_format' ) ) )
			);
		}
		?>
		<?php if ( $refund->get_reason() ) : ?>
			<p class="description"><?php echo esc_html( $refund->get_reason() ); ?></p>
		<?php endif; ?>
		<input type="hidden" class="order_refund_id" name="order_refund_id[]" value="<?php echo esc_attr( $refund->get_id() ); ?>" />

		<?php do_action( 'woocommerce_after_order_refund_item_name', $refund ); ?>
	</td>

	<?php do_action( 'woocommerce_admin_order_item_values', null, $refund, $refund->get_id() ); ?>

	<td class="item_cost" width="1%">&nbsp;</td>
	<td class="quantity" width="1%">&nbsp;</td>

	<td class="line_cost" width="1%">
		<div class="view">
			<?php
			echo wp_kses_post(
				wc_price( '-' . $refund->get_amount(), array( 'currency' => $refund->get_currency() ) )
			);
			?>
		</div>
	</td>

	<?php
	if ( wc_tax_enabled() ) :
		$total_taxes = count( $order_taxes );
		?>
		<?php for ( $i = 0;  $i < $total_taxes; $i++ ) : ?>
			<td class="line_tax" width="1%"></td>
		<?php endfor; ?>
	<?php endif; ?>

	<td class="wc-order-edit-line-item">
		<div class="wc-order-edit-line-item-actions">
			<a class="delete_refund" href="#"></a>
		</div>
	</td>
</tr>
html-order-shipping.php000064400000012151151557063630011164 0ustar00<?php
/**
 * Shows a shipping line
 *
 * @package WooCommerce\Admin
 *
 * @var object $item The item being displayed
 * @var int $item_id The id of the item being displayed
 *
 * @package WooCommerce\Admin\Views
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<tr class="shipping <?php echo ( ! empty( $class ) ) ? esc_attr( $class ) : ''; ?>" data-order_item_id="<?php echo esc_attr( $item_id ); ?>">
	<td class="thumb"><div></div></td>

	<td class="name">
		<div class="view">
			<?php echo esc_html( $item->get_name() ? $item->get_name() : __( 'Shipping', 'woocommerce' ) ); ?>
		</div>
		<div class="edit" style="display: none;">
			<input type="hidden" name="shipping_method_id[]" value="<?php echo esc_attr( $item_id ); ?>" />
			<input type="text" class="shipping_method_name" placeholder="<?php esc_attr_e( 'Shipping name', 'woocommerce' ); ?>" name="shipping_method_title[<?php echo esc_attr( $item_id ); ?>]" value="<?php echo esc_attr( $item->get_name() ); ?>" />
			<select class="shipping_method" name="shipping_method[<?php echo esc_attr( $item_id ); ?>]">
				<optgroup label="<?php esc_attr_e( 'Shipping method', 'woocommerce' ); ?>">
					<option value=""><?php esc_html_e( 'N/A', 'woocommerce' ); ?></option>
					<?php
					$found_method = false;

					foreach ( $shipping_methods as $method ) {
						$is_active = $item->get_method_id() === $method->id;

						echo '<option value="' . esc_attr( $method->id ) . '" ' . selected( true, $is_active, false ) . '>' . esc_html( $method->get_method_title() ) . '</option>';

						if ( $is_active ) {
							$found_method = true;
						}
					}

					if ( ! $found_method && $item->get_method_id() ) {
						echo '<option value="' . esc_attr( $item->get_method_id() ) . '" selected="selected">' . esc_html__( 'Other', 'woocommerce' ) . '</option>';
					} else {
						echo '<option value="other">' . esc_html__( 'Other', 'woocommerce' ) . '</option>';
					}
					?>
				</optgroup>
			</select>
		</div>

		<?php do_action( 'woocommerce_before_order_itemmeta', $item_id, $item, null ); ?>
		<?php require __DIR__ . '/html-order-item-meta.php'; ?>
		<?php do_action( 'woocommerce_after_order_itemmeta', $item_id, $item, null ); ?>
	</td>

	<?php do_action( 'woocommerce_admin_order_item_values', null, $item, absint( $item_id ) ); ?>

	<td class="item_cost" width="1%">&nbsp;</td>
	<td class="quantity" width="1%">&nbsp;</td>

	<td class="line_cost" width="1%">
		<div class="view">
			<?php
			echo wp_kses_post( wc_price( $item->get_total(), array( 'currency' => $order->get_currency() ) ) );
			$refunded = -1 * $order->get_total_refunded_for_item( $item_id, 'shipping' );
			if ( $refunded ) {
				echo wp_kses_post( '<small class="refunded">' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . '</small>' );
			}
			?>
		</div>
		<div class="edit" style="display: none;">
			<input type="text" name="shipping_cost[<?php echo esc_attr( $item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" value="<?php echo esc_attr( wc_format_localized_price( $item->get_total() ) ); ?>" class="line_total wc_input_price" />
		</div>
		<div class="refund" style="display: none;">
			<input type="text" name="refund_line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" class="refund_line_total wc_input_price" />
		</div>
	</td>

	<?php
	$tax_data = $item->get_taxes();
	if ( $tax_data && wc_tax_enabled() ) {
		foreach ( $order_taxes as $tax_item ) {
			$tax_item_id    = $tax_item->get_rate_id();
			$tax_item_total = isset( $tax_data['total'][ $tax_item_id ] ) ? $tax_data['total'][ $tax_item_id ] : '';
			?>
			<td class="line_tax" width="1%">
				<div class="view">
					<?php
					echo wp_kses_post( ( '' !== $tax_item_total ) ? wc_price( $tax_item_total, array( 'currency' => $order->get_currency() ) ) : '&ndash;' );
					$refunded = -1 * $order->get_tax_refunded_for_item( $item_id, $tax_item_id, 'shipping' );
					if ( $refunded ) {
						echo wp_kses_post( '<small class="refunded">' . wc_price( $refunded, array( 'currency' => $order->get_currency() ) ) . '</small>' );
					}
					?>
				</div>
				<div class="edit" style="display: none;">
					<input type="text" name="shipping_taxes[<?php echo absint( $item_id ); ?>][<?php echo esc_attr( $tax_item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" value="<?php echo ( isset( $tax_item_total ) ) ? esc_attr( wc_format_localized_price( $tax_item_total ) ) : ''; ?>" class="line_tax wc_input_price" />
				</div>
				<div class="refund" style="display: none;">
					<input type="text" name="refund_line_tax[<?php echo absint( $item_id ); ?>][<?php echo esc_attr( $tax_item_id ); ?>]" placeholder="<?php echo esc_attr( wc_format_localized_price( 0 ) ); ?>" class="refund_line_tax wc_input_price" data-tax_id="<?php echo esc_attr( $tax_item_id ); ?>" />
				</div>
			</td>
			<?php
		}
	}
	?>
	<td class="wc-order-edit-line-item">
		<?php if ( $order->is_editable() ) : ?>
			<div class="wc-order-edit-line-item-actions">
				<a class="edit-order-item" href="#"></a><a class="delete-order-item" href="#"></a>
			</div>
		<?php endif; ?>
	</td>
</tr>
html-product-attribute-inner.php000064400000011140151557063630013021 0ustar00<?php
/**
 * Product attribute table for reuse.
 *
 * @package WooCommerce\Admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>

<table cellpadding="0" cellspacing="0">
	<tbody>
	<tr>
		<td class="attribute_name">
			<label><?php esc_html_e( 'Name', 'woocommerce' ); ?>:</label>

			<?php if ( $attribute->is_taxonomy() ) : ?>
				<strong><?php echo esc_html( wc_attribute_label( $attribute->get_name() ) ); ?></strong>
				<input type="hidden" name="attribute_names[<?php echo esc_attr( $i ); ?>]" value="<?php echo esc_attr( $attribute->get_name() ); ?>" />
			<?php else : ?>
				<input type="text" class="attribute_name" name="attribute_names[<?php echo esc_attr( $i ); ?>]" value="<?php echo esc_attr( $attribute->get_name() ); ?>" placeholder="<?php esc_attr_e( 'f.e. size or color', 'woocommerce' ); ?>" />
			<?php endif; ?>
			<input type="hidden" name="attribute_position[<?php echo esc_attr( $i ); ?>]" class="attribute_position" value="<?php echo esc_attr( $attribute->get_position() ); ?>" />
		</td>
		<td rowspan="3">
			<label><?php esc_html_e( 'Value(s)', 'woocommerce' ); ?>:</label>
			<?php
			if ( $attribute->is_taxonomy() && $attribute->get_taxonomy_object() ) {
				$attribute_taxonomy = $attribute->get_taxonomy_object();
				$attribute_types    = wc_get_attribute_types();

				if ( ! array_key_exists( $attribute_taxonomy->attribute_type, $attribute_types ) ) {
					$attribute_taxonomy->attribute_type = 'select';
				}

				if ( 'select' === $attribute_taxonomy->attribute_type ) {
					$attribute_orderby = ! empty( $attribute_taxonomy->attribute_orderby ) ? $attribute_taxonomy->attribute_orderby : 'name';
					?>
					<select multiple="multiple"
							data-minimum_input_length="0"
							data-limit="50" data-return_id="id"
							data-placeholder="<?php esc_attr_e( 'Select values', 'woocommerce' ); ?>"
							data-orderby="<?php echo esc_attr( $attribute_orderby ); ?>"
							class="multiselect attribute_values wc-taxonomy-term-search"
							name="attribute_values[<?php echo esc_attr( $i ); ?>][]"
							data-taxonomy="<?php echo esc_attr( $attribute->get_taxonomy() ); ?>">
						<?php
						$selected_terms = $attribute->get_terms();
						if ( $selected_terms ) {
							foreach ( $selected_terms as $selected_term ) {
								/**
								 * Filter the selected attribute term name.
								 *
								 * @since 3.4.0
								 * @param string  $name Name of selected term.
								 * @param array   $term The selected term object.
								 */
								echo '<option value="' . esc_attr( $selected_term->term_id ) . '" selected="selected">' . esc_html( apply_filters( 'woocommerce_product_attribute_term_name', $selected_term->name, $selected_term ) ) . '</option>';
							}
						}
						?>
					</select>
					<button class="button plus select_all_attributes"><?php esc_html_e( 'Select all', 'woocommerce' ); ?></button>
					<button class="button minus select_no_attributes"><?php esc_html_e( 'Select none', 'woocommerce' ); ?></button>
					<button class="button fr plus add_new_attribute"><?php esc_html_e( 'Create value', 'woocommerce' ); ?></button>
					<?php
				}

				/**
				 * Hook to display custom attribute terms.
				 *
				 * @since 3.4.0
				 * @param array|null $attribute_taxonomy Attribute taxonomy object.
				 * @param number $i Attribute index.
				 * @param WC_Product_Attribute $attribute Attribute object.
				 */
				do_action( 'woocommerce_product_option_terms', $attribute_taxonomy, $i, $attribute );
			} else {
				?>
				<textarea name="attribute_values[<?php echo esc_attr( $i ); ?>]" cols="5" rows="5"><?php echo esc_textarea( wc_implode_text_attributes( $attribute->get_options() ) ); ?></textarea>
				<?php
			}
			?>
		</td>
	</tr>
	<tr>
		<td>
			<label><input type="checkbox" class="woocommerce_attribute_visible_on_product_page checkbox" <?php checked( $attribute->get_visible(), true ); ?> name="attribute_visibility[<?php echo esc_attr( $i ); ?>]" value="1" /> <?php esc_html_e( 'Visible on the product page', 'woocommerce' ); ?></label>
		</td>
	</tr>
	<tr>
		<td>
			<div class="enable_variation show_if_variable">
				<label><input type="checkbox" class="woocommerce_attribute_used_for_variations checkbox" <?php checked( $attribute->get_variation(), true ); ?> name="attribute_variation[<?php echo esc_attr( $i ); ?>]" value="1" /> <?php esc_html_e( 'Used for variations', 'woocommerce' ); ?></label>
			</div>
		</td>
	</tr>
	<?php
	/**
	 * Hook to display custom attribute terms.
	 *
	 * @since 3.4.0
	 * @param WC_Product_Attribute $attribute Attribute object.
	 * @param number $i Attribute index.
	 */
	do_action( 'woocommerce_after_product_attribute_settings', $attribute, $i );
	?>
	</tbody>
</table>
html-product-attribute.php000064400000002021151557063630011706 0ustar00<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div data-taxonomy="<?php echo esc_attr( $attribute->get_taxonomy() ); ?>" class="woocommerce_attribute wc-metabox postbox closed <?php echo esc_attr( implode( ' ', $metabox_class ) ); ?>" rel="<?php echo esc_attr( $attribute->get_position() ); ?>">
	<h3>
		<div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'woocommerce' ); ?>"></div>
		<div class="tips sort" data-tip="<?php esc_attr_e( 'Drag and drop to set admin attribute order', 'woocommerce' ); ?>"></div>
		<a href="#" class="remove_row delete"><?php esc_html_e( 'Remove', 'woocommerce' ); ?></a>
		<strong class="attribute_name<?php echo esc_attr( $attribute->get_name() === '' ? ' placeholder' : '' ); ?>"><?php echo esc_html( $attribute->get_name() !== '' ? wc_attribute_label( $attribute->get_name() ) : __( 'New attribute', 'woocommerce' ) ); ?></strong>
	</h3>
	<div class="woocommerce_attribute_data wc-metabox-content hidden">
		<?php require __DIR__ . '/html-product-attribute-inner.php'; ?>
	</div>
</div>
html-product-data-advanced.php000064400000003053151557063630012365 0ustar00<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div id="advanced_product_data" class="panel woocommerce_options_panel hidden">

	<div class="options_group hide_if_external hide_if_grouped">
		<?php
		woocommerce_wp_textarea_input(
			array(
				'id'          => '_purchase_note',
				'value'       => $product_object->get_purchase_note( 'edit' ),
				'label'       => __( 'Purchase note', 'woocommerce' ),
				'desc_tip'    => true,
				'description' => __( 'Enter an optional note to send the customer after purchase.', 'woocommerce' ),
			)
		);
		?>
	</div>

	<div class="options_group">
		<?php
		woocommerce_wp_text_input(
			array(
				'id'                => 'menu_order',
				'value'             => $product_object->get_menu_order( 'edit' ),
				'label'             => __( 'Menu order', 'woocommerce' ),
				'desc_tip'          => true,
				'description'       => __( 'Custom ordering position.', 'woocommerce' ),
				'type'              => 'number',
				'custom_attributes' => array(
					'step' => '1',
				),
			)
		);
		?>
	</div>

	<?php if ( post_type_supports( 'product', 'comments' ) ) : ?>
		<div class="options_group reviews">
			<?php
				woocommerce_wp_checkbox(
					array(
						'id'      => 'comment_status',
						'value'   => $product_object->get_reviews_allowed( 'edit' ) ? 'open' : 'closed',
						'label'   => __( 'Enable reviews', 'woocommerce' ),
						'cbvalue' => 'open',
					)
				);
				do_action( 'woocommerce_product_options_reviews' );
			?>
		</div>
	<?php endif; ?>

	<?php do_action( 'woocommerce_product_options_advanced' ); ?>
</div>
html-product-data-attributes.php000064400000004552151557063630013013 0ustar00<?php
/**
 * Displays the attributes tab in the product data meta box.
 *
 * @package WooCommerce\Admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

global $wc_product_attributes;
// Array of defined attribute taxonomies.
$attribute_taxonomies = wc_get_attribute_taxonomies();
// Product attributes - taxonomies and custom, ordered, with visibility and variation attributes set.
$product_attributes = $product_object->get_attributes( 'edit' );
?>
<div id="product_attributes" class="panel wc-metaboxes-wrapper hidden">
	<div class="toolbar toolbar-top">
		<div id="message" class="inline notice woocommerce-message is-dismissible">
			<p class="help">
				<?php
				esc_html_e(
					'Add descriptive pieces of information that customers can use to search for this product on your store, such as “Material” or “Brand”.',
					'woocommerce'
				);
				?>
				<button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice.', 'woocommerce' ); ?></span></button>
			</p>
		</div>
		<span class="expand-close">
			<a href="#" class="expand_all"><?php esc_html_e( 'Expand', 'woocommerce' ); ?></a> / <a href="#" class="close_all"><?php esc_html_e( 'Close', 'woocommerce' ); ?></a>
		</span>
		<div class="actions">
			<button type="button" class="button add_custom_attribute"><?php esc_html_e( 'Add new', 'woocommerce' ); ?></button>
			<select class="wc-attribute-search" data-placeholder="<?php esc_attr_e( 'Add existing', 'woocommerce' ); ?>" data-minimum-input-length="0">
			</select>
		</div>
	</div>
	<div class="product_attributes wc-metaboxes">
		<?php
		$i = -1;

		foreach ( $product_attributes as $attribute ) {
			$i++;
			$metabox_class = array();

			if ( $attribute->is_taxonomy() ) {
				$metabox_class[] = 'taxonomy';
				$metabox_class[] = $attribute->get_name();
			}

			include __DIR__ . '/html-product-attribute.php';
		}
		?>
	</div>
	<div class="toolbar toolbar-buttons">
		<span class="expand-close">
			<a href="#" class="expand_all"><?php esc_html_e( 'Expand', 'woocommerce' ); ?></a> / <a href="#" class="close_all"><?php esc_html_e( 'Close', 'woocommerce' ); ?></a>
		</span>
		<button type="button" aria-disabled="true" class="button save_attributes button-primary disabled"><?php esc_html_e( 'Save attributes', 'woocommerce' ); ?></button>
	</div>
	<?php do_action( 'woocommerce_product_options_attributes' ); ?>
</div>
html-product-data-general.php000064400000020641151557063630012237 0ustar00<?php
/**
 * Product general data panel.
 *
 * @package WooCommerce\Admin
 */

defined( 'ABSPATH' ) || exit;

?>
<div id="general_product_data" class="panel woocommerce_options_panel">

	<div class="options_group show_if_external">
		<?php
		woocommerce_wp_text_input(
			array(
				'id'          => '_product_url',
				'value'       => is_callable( array( $product_object, 'get_product_url' ) ) ? $product_object->get_product_url( 'edit' ) : '',
				'label'       => __( 'Product URL', 'woocommerce' ),
				'placeholder' => 'https://',
				'description' => __( 'Enter the external URL to the product.', 'woocommerce' ),
			)
		);

		woocommerce_wp_text_input(
			array(
				'id'          => '_button_text',
				'value'       => is_callable( array( $product_object, 'get_button_text' ) ) ? $product_object->get_button_text( 'edit' ) : '',
				'label'       => __( 'Button text', 'woocommerce' ),
				'placeholder' => _x( 'Buy product', 'placeholder', 'woocommerce' ),
				'description' => __( 'This text will be shown on the button linking to the external product.', 'woocommerce' ),
			)
		);

		do_action( 'woocommerce_product_options_external' );
		?>
	</div>

	<div class="options_group pricing show_if_simple show_if_external hidden">
		<?php
		woocommerce_wp_text_input(
			array(
				'id'        => '_regular_price',
				'value'     => $product_object->get_regular_price( 'edit' ),
				'label'     => __( 'Regular price', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol() . ')',
				'data_type' => 'price',
			)
		);

		woocommerce_wp_text_input(
			array(
				'id'          => '_sale_price',
				'value'       => $product_object->get_sale_price( 'edit' ),
				'data_type'   => 'price',
				'label'       => __( 'Sale price', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol() . ')',
				'description' => '<a href="#" class="sale_schedule">' . __( 'Schedule', 'woocommerce' ) . '</a>',
			)
		);

		$sale_price_dates_from_timestamp = $product_object->get_date_on_sale_from( 'edit' ) ? $product_object->get_date_on_sale_from( 'edit' )->getOffsetTimestamp() : false;
		$sale_price_dates_to_timestamp   = $product_object->get_date_on_sale_to( 'edit' ) ? $product_object->get_date_on_sale_to( 'edit' )->getOffsetTimestamp() : false;

		$sale_price_dates_from = $sale_price_dates_from_timestamp ? date_i18n( 'Y-m-d', $sale_price_dates_from_timestamp ) : '';
		$sale_price_dates_to   = $sale_price_dates_to_timestamp ? date_i18n( 'Y-m-d', $sale_price_dates_to_timestamp ) : '';

		echo '<p class="form-field sale_price_dates_fields">
				<label for="_sale_price_dates_from">' . esc_html__( 'Sale price dates', 'woocommerce' ) . '</label>
				<input type="text" class="short" name="_sale_price_dates_from" id="_sale_price_dates_from" value="' . esc_attr( $sale_price_dates_from ) . '" placeholder="' . esc_html( _x( 'From&hellip;', 'placeholder', 'woocommerce' ) ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ) . '" />
				<input type="text" class="short" name="_sale_price_dates_to" id="_sale_price_dates_to" value="' . esc_attr( $sale_price_dates_to ) . '" placeholder="' . esc_html( _x( 'To&hellip;', 'placeholder', 'woocommerce' ) ) . '  YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ) . '" />
				<a href="#" class="description cancel_sale_schedule">' . esc_html__( 'Cancel', 'woocommerce' ) . '</a>' . wc_help_tip( __( 'The sale will start at 00:00:00 of "From" date and end at 23:59:59 of "To" date.', 'woocommerce' ) ) . '
			</p>';

		do_action( 'woocommerce_product_options_pricing' );
		?>
	</div>

	<div class="options_group show_if_downloadable hidden">
		<div class="form-field downloadable_files">
			<label><?php esc_html_e( 'Downloadable files', 'woocommerce' ); ?></label>
			<table class="widefat">
				<thead>
					<tr>
						<th class="sort">&nbsp;</th>
						<th><?php esc_html_e( 'Name', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the name of the download shown to the customer.', 'woocommerce' ) ); ?></th>
						<th colspan="2"><?php esc_html_e( 'File URL', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the URL or absolute path to the file which customers will get access to. URLs entered here should already be encoded.', 'woocommerce' ) ); ?></th>
						<th>&nbsp;</th>
					</tr>
				</thead>
				<tbody>
					<?php
					$downloadable_files       = $product_object->get_downloads( 'edit' );
					$disabled_downloads_count = 0;

					if ( $downloadable_files ) {
						foreach ( $downloadable_files as $key => $file ) {
							$disabled_download         = isset( $file['enabled'] ) && false === $file['enabled'];
							$disabled_downloads_count += (int) $disabled_download;
							include __DIR__ . '/html-product-download.php';
						}
					}
					?>
				</tbody>
				<tfoot>
					<tr>
						<th colspan="2">
							<a href="#" class="button insert" data-row="
							<?php
								$key               = '';
								$file              = array(
									'file' => '',
									'name' => '',
								);
								$disabled_download = false;
								ob_start();
								require __DIR__ . '/html-product-download.php';
								echo esc_attr( ob_get_clean() );
								?>
							"><?php esc_html_e( 'Add File', 'woocommerce' ); ?></a>
						</th>
						<th colspan="3">
							<?php if ( $disabled_downloads_count ) : ?>
								<span class="disabled">*</span>
								<?php
									printf(
										/* translators: 1: opening link tag, 2: closing link tag. */
										esc_html__( 'The indicated downloads have been disabled (invalid location or filetype&mdash;%1$slearn more%2$s).', 'woocommerce' ),
										'<a href="https://woocommerce.com/document/approved-download-directories" target="_blank">',
										'</a>'
									);
								?>
							<?php endif; ?>
						</th>
					</tr>
				</tfoot>
			</table>
		</div>
		<?php
		woocommerce_wp_text_input(
			array(
				'id'                => '_download_limit',
				'value'             => -1 === $product_object->get_download_limit( 'edit' ) ? '' : $product_object->get_download_limit( 'edit' ),
				'label'             => __( 'Download limit', 'woocommerce' ),
				'placeholder'       => __( 'Unlimited', 'woocommerce' ),
				'description'       => __( 'Leave blank for unlimited re-downloads.', 'woocommerce' ),
				'type'              => 'number',
				'custom_attributes' => array(
					'step' => '1',
					'min'  => '0',
				),
			)
		);

		woocommerce_wp_text_input(
			array(
				'id'                => '_download_expiry',
				'value'             => -1 === $product_object->get_download_expiry( 'edit' ) ? '' : $product_object->get_download_expiry( 'edit' ),
				'label'             => __( 'Download expiry', 'woocommerce' ),
				'placeholder'       => __( 'Never', 'woocommerce' ),
				'description'       => __( 'Enter the number of days before a download link expires, or leave blank.', 'woocommerce' ),
				'type'              => 'number',
				'custom_attributes' => array(
					'step' => '1',
					'min'  => '0',
				),
			)
		);

		do_action( 'woocommerce_product_options_downloads' );
		?>
	</div>

	<?php if ( wc_tax_enabled() ) : ?>
		<div class="options_group show_if_simple show_if_external show_if_variable">
			<?php
			woocommerce_wp_select(
				array(
					'id'          => '_tax_status',
					'value'       => $product_object->get_tax_status( 'edit' ),
					'label'       => __( 'Tax status', 'woocommerce' ),
					'options'     => array(
						'taxable'  => __( 'Taxable', 'woocommerce' ),
						'shipping' => __( 'Shipping only', 'woocommerce' ),
						'none'     => _x( 'None', 'Tax status', 'woocommerce' ),
					),
					'desc_tip'    => 'true',
					'description' => __( 'Define whether or not the entire product is taxable, or just the cost of shipping it.', 'woocommerce' ),
				)
			);

			woocommerce_wp_select(
				array(
					'id'          => '_tax_class',
					'value'       => $product_object->get_tax_class( 'edit' ),
					'label'       => __( 'Tax class', 'woocommerce' ),
					'options'     => wc_get_product_tax_class_options(),
					'desc_tip'    => 'true',
					'description' => __( 'Choose a tax class for this product. Tax classes are used to apply different tax rates specific to certain types of product.', 'woocommerce' ),
				)
			);

			do_action( 'woocommerce_product_options_tax' );
			?>
		</div>
	<?php endif; ?>

	<?php do_action( 'woocommerce_product_options_general_product_data' ); ?>
</div>
html-product-data-inventory.php000064400000015645151557063630012667 0ustar00<?php
/**
 * Displays the inventory tab in the product data meta box.
 *
 * @package WooCommerce\Admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div id="inventory_product_data" class="panel woocommerce_options_panel hidden">
	<div class="options_group">
		<?php
		$info_img_url = WC_ADMIN_IMAGES_FOLDER_URL . '/icons/info.svg';

		if ( wc_product_sku_enabled() ) {
			woocommerce_wp_text_input(
				array(
					'id'          => '_sku',
					'value'       => $product_object->get_sku( 'edit' ),
					'label'       => '<abbr title="' . esc_attr__( 'Stock Keeping Unit', 'woocommerce' ) . '">' . esc_html__( 'SKU', 'woocommerce' ) . '</abbr>',
					'desc_tip'    => true,
					'description' => __( 'SKU refers to a Stock-keeping unit, a unique identifier for each distinct product and service that can be purchased.', 'woocommerce' ),
				)
			);
		}

		do_action( 'woocommerce_product_options_sku' );

		?>
		<div class="inline notice woocommerce-message show_if_variable">
			<img class="info-icon" src="<?php echo esc_url( $info_img_url ); ?>" />
			<p>
				<?php echo esc_html_e( 'Settings below apply to all variations without manual stock management enabled. ', 'woocommerce' ); ?> <a target="_blank" href="https://woocommerce.com/document/variable-product/"><?php esc_html_e( 'Learn more', 'woocommerce' ); ?></a>
			</p>
		</div>
		<?php

		if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) {

			woocommerce_wp_checkbox(
				array(
					'id'            => '_manage_stock',
					'value'         => $product_object->get_manage_stock( 'edit' ) ? 'yes' : 'no',
					'wrapper_class' => 'show_if_simple show_if_variable',
					'label'         => __( 'Stock management', 'woocommerce' ),
					'description'   => __( 'Track stock quantity for this product', 'woocommerce' ),
				)
			);

			do_action( 'woocommerce_product_options_stock' );

			echo '<div class="stock_fields show_if_simple show_if_variable">';

			woocommerce_wp_text_input(
				array(
					'id'                => '_stock',
					'value'             => wc_stock_amount( $product_object->get_stock_quantity( 'edit' ) ?? 1 ),
					'label'             => __( 'Quantity', 'woocommerce' ),
					'desc_tip'          => true,
					'description'       => __( 'Stock quantity. If this is a variable product this value will be used to control stock for all variations, unless you define stock at variation level.', 'woocommerce' ),
					'type'              => 'number',
					'custom_attributes' => array(
						'step' => 'any',
					),
					'data_type'         => 'stock',
				)
			);

			echo '<input type="hidden" name="_original_stock" value="' . esc_attr( wc_stock_amount( $product_object->get_stock_quantity( 'edit' ) ) ) . '" />';

			$backorder_args = array(
				'id'          => '_backorders',
				'value'       => $product_object->get_backorders( 'edit' ),
				'label'       => __( 'Allow backorders?', 'woocommerce' ),
				'options'     => wc_get_product_backorder_options(),
			);

			/**
			 * Allow 3rd parties to control whether "Allow backorder?" option will use radio buttons or a select.
			 *
			 * @since 7.6.0
			 *
			 * @param bool If false, "Allow backorders?" will be shown as a select. Default: it will use radio buttons.
			 */
			if ( apply_filters( 'woocommerce_product_allow_backorder_use_radio', true ) ) {
				woocommerce_wp_radio( $backorder_args );
			} else {
				woocommerce_wp_select( $backorder_args );
			}

			woocommerce_wp_text_input(
				array(
					'id'                => '_low_stock_amount',
					'value'             => $product_object->get_low_stock_amount( 'edit' ),
					'placeholder'       => sprintf(
						/* translators: %d: Amount of stock left */
						esc_attr__( 'Store-wide threshold (%d)', 'woocommerce' ),
						esc_attr( get_option( 'woocommerce_notify_low_stock_amount' ) )
					),
					'label'             => __( 'Low stock threshold', 'woocommerce' ),
					'desc_tip'          => true,
					'description'       => __( 'When product stock reaches this amount you will be notified by email. It is possible to define different values for each variation individually. The shop default value can be set in Settings > Products > Inventory.', 'woocommerce' ),
					'type'              => 'number',
					'custom_attributes' => array(
						'step' => 'any',
					),
				)
			);

			do_action( 'woocommerce_product_options_stock_fields' );

			echo '</div>';
		} else {

			woocommerce_wp_note(
				array(
					'id'               => '_manage_stock_disabled',
					'label'            => __( 'Stock management', 'woocommerce' ),
					'label-aria-label' => __( 'Stock management disabled in store settings', 'woocommerce' ),
					'message'          => sprintf(
						/* translators: %s: url for store settings */
						__( 'Disabled in <a href="%s" aria-label="stock management store settings">store settings</a>.', 'woocommerce' ),
						esc_url( 'admin.php?page=wc-settings&tab=products&section=inventory' )
					),
					'wrapper_class'    => 'show_if_simple show_if_variable',
				)
			);

		}

		$stock_status_options = wc_get_product_stock_status_options();
		$stock_status_count   = count( $stock_status_options );
		$stock_status_args    = array(
			'id'            => '_stock_status',
			'value'         => $product_object->get_stock_status( 'edit' ),
			'wrapper_class' => 'stock_status_field hide_if_variable hide_if_external hide_if_grouped',
			'label'         => __( 'Stock status', 'woocommerce' ),
			'options'       => $stock_status_options,
			'desc_tip'      => true,
			'description'   => __( 'Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend.', 'woocommerce' ),
		);

		/**
		 * Allow 3rd parties to control whether the "Stock status" option will use radio buttons or a select.
		 *
		 * @since 7.6.0
		 *
		 * @param bool If false, the "Stock status" will be shown as a select. Default: it will use radio buttons.
		 */
		if ( apply_filters( 'woocommerce_product_stock_status_use_radio', $stock_status_count <= 3 && $stock_status_count >= 1 ) ) {
			woocommerce_wp_radio( $stock_status_args );
		} else {
			woocommerce_wp_select( $stock_status_args );
		}

		do_action( 'woocommerce_product_options_stock_status' );
		?>
	</div>

	<div class="inventory_sold_individually options_group show_if_simple show_if_variable">
		<?php
		woocommerce_wp_checkbox(
			array(
				'id'            => '_sold_individually',
				'value'         => $product_object->get_sold_individually( 'edit' ) ? 'yes' : 'no',
				'wrapper_class' => 'show_if_simple show_if_variable',
				'label'         => __( 'Sold individually', 'woocommerce' ),
				'description'   => __( 'Limit purchases to 1 item per order', 'woocommerce' ),
			)
		);

		echo wc_help_tip( __( 'Check to let customers to purchase only 1 item in a single order. This is particularly useful for items that have limited quantity, for example art or handmade goods.', 'woocommerce' ) );

		do_action( 'woocommerce_product_options_sold_individually' );
		?>
	</div>

	<?php do_action( 'woocommerce_product_options_inventory_product_data' ); ?>
</div>
html-product-data-linked-products.php000064400000006724151557063630013737 0ustar00<?php
/**
 * Linked product options.
 *
 * @package WooCommerce\Admin
 */

defined( 'ABSPATH' ) || exit;
?>
<div id="linked_product_data" class="panel woocommerce_options_panel hidden">

	<div class="options_group show_if_grouped">
		<p class="form-field">
			<label for="grouped_products"><?php esc_html_e( 'Grouped products', 'woocommerce' ); ?></label>
			<select class="wc-product-search" multiple="multiple" style="width: 50%;" id="grouped_products" name="grouped_products[]" data-sortable="true" data-placeholder="<?php esc_attr_e( 'Search for a product&hellip;', 'woocommerce' ); ?>" data-action="woocommerce_json_search_products" data-exclude="<?php echo intval( $post->ID ); ?>">
				<?php
				$product_ids = $product_object->is_type( 'grouped' ) ? $product_object->get_children( 'edit' ) : array();

				foreach ( $product_ids as $product_id ) {
					$product = wc_get_product( $product_id );
					if ( is_object( $product ) ) {
						echo '<option value="' . esc_attr( $product_id ) . '"' . selected( true, true, false ) . '>' . esc_html( wp_strip_all_tags( $product->get_formatted_name() ) ) . '</option>';
					}
				}
				?>
			</select> <?php echo wc_help_tip( __( 'This lets you choose which products are part of this group.', 'woocommerce' ) ); // WPCS: XSS ok. ?>
		</p>
	</div>

	<div class="options_group">
		<p class="form-field">
			<label for="upsell_ids"><?php esc_html_e( 'Upsells', 'woocommerce' ); ?></label>
			<select class="wc-product-search" multiple="multiple" style="width: 50%;" id="upsell_ids" name="upsell_ids[]" data-placeholder="<?php esc_attr_e( 'Search for a product&hellip;', 'woocommerce' ); ?>" data-action="woocommerce_json_search_products_and_variations" data-exclude="<?php echo intval( $post->ID ); ?>">
				<?php
				$product_ids = $product_object->get_upsell_ids( 'edit' );

				foreach ( $product_ids as $product_id ) {
					$product = wc_get_product( $product_id );
					if ( is_object( $product ) ) {
						echo '<option value="' . esc_attr( $product_id ) . '"' . selected( true, true, false ) . '>' . esc_html( wp_strip_all_tags( $product->get_formatted_name() ) ) . '</option>';
					}
				}
				?>
			</select> <?php echo wc_help_tip( __( 'Upsells are products which you recommend instead of the currently viewed product, for example, products that are more profitable or better quality or more expensive.', 'woocommerce' ) ); // WPCS: XSS ok. ?>
		</p>

		<p class="form-field hide_if_grouped hide_if_external">
			<label for="crosssell_ids"><?php esc_html_e( 'Cross-sells', 'woocommerce' ); ?></label>
			<select class="wc-product-search" multiple="multiple" style="width: 50%;" id="crosssell_ids" name="crosssell_ids[]" data-placeholder="<?php esc_attr_e( 'Search for a product&hellip;', 'woocommerce' ); ?>" data-action="woocommerce_json_search_products_and_variations" data-exclude="<?php echo intval( $post->ID ); ?>">
				<?php
				$product_ids = $product_object->get_cross_sell_ids( 'edit' );

				foreach ( $product_ids as $product_id ) {
					$product = wc_get_product( $product_id );
					if ( is_object( $product ) ) {
						echo '<option value="' . esc_attr( $product_id ) . '"' . selected( true, true, false ) . '>' . esc_html( wp_strip_all_tags( $product->get_formatted_name() ) ) . '</option>';
					}
				}
				?>
			</select> <?php echo wc_help_tip( __( 'Cross-sells are products which you promote in the cart, based on the current product.', 'woocommerce' ) ); // WPCS: XSS ok. ?>
		</p>
	</div>

	<?php do_action( 'woocommerce_product_options_related' ); ?>
</div>
html-product-data-panel.php000064400000004656151557063630011731 0ustar00<?php
/**
 * Product data meta box.
 *
 * @package WooCommerce\Admin
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>

<div class="panel-wrap product_data">

	<span class="product-data-wrapper type_box hidden"> &mdash;
		<label for="product-type">
			<select id="product-type" name="product-type">
				<optgroup label="<?php esc_attr_e( 'Product Type', 'woocommerce' ); ?>">
				<?php foreach ( wc_get_product_types() as $value => $label ) : ?>
					<option value="<?php echo esc_attr( $value ); ?>" <?php echo selected( $product_object->get_type(), $value, false ); ?>><?php echo esc_html( $label ); ?></option>
				<?php endforeach; ?>
				</optgroup>
			</select>
			<span class="woocommerce-product-type-tip"></span>
		</label>

		<?php
		foreach ( self::get_product_type_options() as $key => $option ) :
			if ( metadata_exists( 'post', $post->ID, '_' . $key ) ) {
				$selected_value = is_callable( array( $product_object, "is_$key" ) ) ? $product_object->{"is_$key"}() : 'yes' === get_post_meta( $post->ID, '_' . $key, true );
			} else {
				$selected_value = 'yes' === ( isset( $option['default'] ) ? $option['default'] : 'no' );
			}
			?>
			<label for="<?php echo esc_attr( $option['id'] ); ?>" class="<?php echo esc_attr( $option['wrapper_class'] ); ?> tips" data-tip="<?php echo esc_attr( $option['description'] ); ?>">
				<?php echo esc_html( $option['label'] ); ?>:
				<input type="checkbox" name="<?php echo esc_attr( $option['id'] ); ?>" id="<?php echo esc_attr( $option['id'] ); ?>" data-product-type-option-id="<?php echo esc_attr( $option['id'] ); ?>" <?php echo checked( $selected_value, true, false ); ?> />
			</label>
		<?php endforeach; ?>
	</span>

	<ul class="product_data_tabs wc-tabs">
		<?php foreach ( self::get_product_data_tabs() as $key => $tab ) : ?>
			<li class="<?php echo esc_attr( $key ); ?>_options <?php echo esc_attr( $key ); ?>_tab <?php echo esc_attr( isset( $tab['class'] ) ? implode( ' ', (array) $tab['class'] ) : '' ); ?>">
				<a href="#<?php echo esc_attr( $tab['target'] ); ?>"><span><?php echo esc_html( $tab['label'] ); ?></span></a>
			</li>
		<?php endforeach; ?>
		<?php do_action( 'woocommerce_product_write_panel_tabs' ); ?>
	</ul>

	<?php
		self::output_tabs();
		self::output_variations();
		do_action( 'woocommerce_product_data_panels' );
		wc_do_deprecated_action( 'woocommerce_product_write_panels', array(), '2.6', 'Use woocommerce_product_data_panels action instead.' );
	?>
	<div class="clear"></div>
</div>
html-product-data-shipping.php000064400000006202151557063630012440 0ustar00<?php
use Automattic\WooCommerce\Utilities\I18nUtil;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div id="shipping_product_data" class="panel woocommerce_options_panel hidden">
	<div class="options_group">
		<?php
		if ( wc_product_weight_enabled() ) {
			woocommerce_wp_text_input(
				array(
					'id'          => '_weight',
					'value'       => $product_object->get_weight( 'edit' ),
					'label'       => sprintf(
						/* translators: %s: Weight unit */
						__( 'Weight (%s)', 'woocommerce' ),
						I18nUtil::get_weight_unit_label( get_option( 'woocommerce_weight_unit', 'kg' ) )
					),
					'placeholder' => wc_format_localized_decimal( 0 ),
					'desc_tip'    => true,
					'description' => __( 'Weight in decimal form', 'woocommerce' ),
					'type'        => 'text',
					'data_type'   => 'decimal',
				)
			);
		}

		if ( wc_product_dimensions_enabled() ) {
			?>
			<p class="form-field dimensions_field">
				<label for="product_length">
					<?php
					printf(
						/* translators: WooCommerce dimension unit */
						esc_html__( 'Dimensions (%s)', 'woocommerce' ),
						esc_html( I18nUtil::get_dimensions_unit_label( get_option( 'woocommerce_dimension_unit' ) ) )
					);
					?>
				</label>
				<span class="wrap">
					<input id="product_length" placeholder="<?php esc_attr_e( 'Length', 'woocommerce' ); ?>" class="input-text wc_input_decimal" size="6" type="text" name="_length" value="<?php echo esc_attr( wc_format_localized_decimal( $product_object->get_length( 'edit' ) ) ); ?>" />
					<input id="product_width" placeholder="<?php esc_attr_e( 'Width', 'woocommerce' ); ?>" class="input-text wc_input_decimal" size="6" type="text" name="_width" value="<?php echo esc_attr( wc_format_localized_decimal( $product_object->get_width( 'edit' ) ) ); ?>" />
					<input id="product_height" placeholder="<?php esc_attr_e( 'Height', 'woocommerce' ); ?>" class="input-text wc_input_decimal last" size="6" type="text" name="_height" value="<?php echo esc_attr( wc_format_localized_decimal( $product_object->get_height( 'edit' ) ) ); ?>" />
				</span>
				<?php echo wc_help_tip( __( 'LxWxH in decimal form', 'woocommerce' ) ); ?>
			</p>
			<?php
		}

		do_action( 'woocommerce_product_options_dimensions' );
		?>
	</div>

	<div class="options_group">
		<?php
		$args = array(
			'taxonomy'         => 'product_shipping_class',
			'hide_empty'       => 0,
			'show_option_none' => __( 'No shipping class', 'woocommerce' ),
			'name'             => 'product_shipping_class',
			'id'               => 'product_shipping_class',
			'selected'         => $product_object->get_shipping_class_id( 'edit' ),
			'class'            => 'select short',
			'orderby'          => 'name',
		);
		?>
		<p class="form-field shipping_class_field">
			<label for="product_shipping_class"><?php esc_html_e( 'Shipping class', 'woocommerce' ); ?></label>
			<?php wp_dropdown_categories( $args ); ?>
			<?php echo wc_help_tip( __( 'Shipping classes are used by certain shipping methods to group similar products.', 'woocommerce' ) ); ?>
		</p>
		<?php

		do_action( 'woocommerce_product_options_shipping' );
		?>
	</div>
	<?php do_action( 'woocommerce_product_options_shipping_product_data' ); ?>
</div>
html-product-data-variations.php000064400000033010151557063630012773 0ustar00<?php
/**
 * Product data variations
 *
 * @package WooCommerce\Admin\Metaboxes\Views
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$add_attributes_img_url = WC_ADMIN_IMAGES_FOLDER_URL . '/icons/info.svg';
$background_img_url     = WC_ADMIN_IMAGES_FOLDER_URL . '/product_data/no-variation-background-image.svg';
$arrow_img_url          = WC_ADMIN_IMAGES_FOLDER_URL . '/product_data/no-variation-arrow.svg';
?>
<div id="variable_product_options" class="panel wc-metaboxes-wrapper hidden">
	<div id="variable_product_options_inner">

		<?php if ( ! count( $variation_attributes ) ) : ?>

		<div class="add-attributes-container">
			<div class="add-attributes-message">
				<img src="<?php echo esc_url( $add_attributes_img_url ); ?>" />
				<p>
					<?php
						echo wp_kses_post(
							sprintf(
								/* translators: %1$s: url for attributes tab, %2$s: url for variable product documentation */
								__( 'Add some attributes in the <a class="variations-add-attributes-link" href="%1$s">Attributes</a> tab to generate variations. Make sure to check the <b>Used for variations</b> box. <a class="variations-learn-more-link" href="%2$s" target="_blank" rel="noreferrer">Learn more</a>', 'woocommerce' ),
								esc_url( '#product_attributes' ),
								esc_url( 'https://woocommerce.com/document/variable-product/' )
							)
						);
					?>
				</p>
			</div>
		</div>

		<?php else : ?>

			<div class="toolbar toolbar-variations-defaults">
				<div class="variations-defaults">
					<strong><?php esc_html_e( 'Default Form Values', 'woocommerce' ); ?>: <?php echo wc_help_tip( __( 'Choose a default form value if you want a certain variation already selected when a user visits the product page.', 'woocommerce' ) ); ?></strong>
					<?php
					foreach ( $variation_attributes as $attribute ) {
						$selected_value = isset( $default_attributes[ sanitize_title( $attribute->get_name() ) ] ) ? $default_attributes[ sanitize_title( $attribute->get_name() ) ] : '';
						?>
						<select name="default_attribute_<?php echo esc_attr( sanitize_title( $attribute->get_name() ) ); ?>" data-current="<?php echo esc_attr( $selected_value ); ?>">
							<?php /* translators: WooCommerce attribute label */ ?>
							<option value=""><?php echo esc_html( sprintf( __( 'No default %s&hellip;', 'woocommerce' ), wc_attribute_label( $attribute->get_name() ) ) ); ?></option>
							<?php if ( $attribute->is_taxonomy() ) : ?>
								<?php foreach ( $attribute->get_terms() as $option ) : ?>
									<?php /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ ?>
									<option <?php selected( $selected_value, $option->slug ); ?> value="<?php echo esc_attr( $option->slug ); ?>"><?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option->name, $option, $attribute->get_name(), $product_object ) ); ?></option>
									<?php /* phpcs:enable */ ?>
								<?php endforeach; ?>
							<?php else : ?>
								<?php foreach ( $attribute->get_options() as $option ) : ?>
									<?php /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ ?>
									<option <?php selected( $selected_value, $option ); ?> value="<?php echo esc_attr( $option ); ?>"><?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute->get_name(), $product_object ) ); ?></option>
									<?php /* phpcs:enable */ ?>
								<?php endforeach; ?>
							<?php endif; ?>
						</select>
						<?php
					}
					?>
				</div>
				<div class="clear"></div>
			</div>

			<?php /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ ?>
			<?php do_action( 'woocommerce_variable_product_before_variations' ); ?>
			<?php /* phpcs:enable */ ?>

			<div class="toolbar toolbar-top">
				<button type="button" class="button generate_variations"><?php esc_html_e( 'Generate variations', 'woocommerce' ); ?></button>
				<button type="button" class="button add_variation_manually"><?php esc_html_e( 'Add manually', 'woocommerce' ); ?></button>
				<select id="field_to_edit" class="select variation_actions hidden">
					<option value="bulk_actions" disabled>Bulk actions</option>
					<option value="delete_all"><?php esc_html_e( 'Delete all variations', 'woocommerce' ); ?></option>
					<optgroup label="<?php esc_attr_e( 'Status', 'woocommerce' ); ?>">
						<option value="toggle_enabled"><?php esc_html_e( 'Toggle &quot;Enabled&quot;', 'woocommerce' ); ?></option>
						<option value="toggle_downloadable"><?php esc_html_e( 'Toggle &quot;Downloadable&quot;', 'woocommerce' ); ?></option>
						<option value="toggle_virtual"><?php esc_html_e( 'Toggle &quot;Virtual&quot;', 'woocommerce' ); ?></option>
					</optgroup>
					<optgroup label="<?php esc_attr_e( 'Pricing', 'woocommerce' ); ?>">
						<option value="variable_regular_price"><?php esc_html_e( 'Set regular prices', 'woocommerce' ); ?></option>
						<option value="variable_regular_price_increase"><?php esc_html_e( 'Increase regular prices (fixed amount or percentage)', 'woocommerce' ); ?></option>
						<option value="variable_regular_price_decrease"><?php esc_html_e( 'Decrease regular prices (fixed amount or percentage)', 'woocommerce' ); ?></option>
						<option value="variable_sale_price"><?php esc_html_e( 'Set sale prices', 'woocommerce' ); ?></option>
						<option value="variable_sale_price_increase"><?php esc_html_e( 'Increase sale prices (fixed amount or percentage)', 'woocommerce' ); ?></option>
						<option value="variable_sale_price_decrease"><?php esc_html_e( 'Decrease sale prices (fixed amount or percentage)', 'woocommerce' ); ?></option>
						<option value="variable_sale_schedule"><?php esc_html_e( 'Set scheduled sale dates', 'woocommerce' ); ?></option>
					</optgroup>
					<optgroup label="<?php esc_attr_e( 'Inventory', 'woocommerce' ); ?>">
						<option value="toggle_manage_stock"><?php esc_html_e( 'Toggle &quot;Manage stock&quot;', 'woocommerce' ); ?></option>
						<option value="variable_stock"><?php esc_html_e( 'Stock', 'woocommerce' ); ?></option>
						<option value="variable_stock_status_instock"><?php esc_html_e( 'Set Status - In stock', 'woocommerce' ); ?></option>
						<option value="variable_stock_status_outofstock"><?php esc_html_e( 'Set Status - Out of stock', 'woocommerce' ); ?></option>
						<option value="variable_stock_status_onbackorder"><?php esc_html_e( 'Set Status - On backorder', 'woocommerce' ); ?></option>
						<option value="variable_low_stock_amount"><?php esc_html_e( 'Low stock threshold', 'woocommerce' ); ?></option>
					</optgroup>
					<optgroup label="<?php esc_attr_e( 'Shipping', 'woocommerce' ); ?>">
						<option value="variable_length"><?php esc_html_e( 'Length', 'woocommerce' ); ?></option>
						<option value="variable_width"><?php esc_html_e( 'Width', 'woocommerce' ); ?></option>
						<option value="variable_height"><?php esc_html_e( 'Height', 'woocommerce' ); ?></option>
						<option value="variable_weight"><?php esc_html_e( 'Weight', 'woocommerce' ); ?></option>
					</optgroup>
					<optgroup label="<?php esc_attr_e( 'Downloadable products', 'woocommerce' ); ?>">
						<option value="variable_download_limit"><?php esc_html_e( 'Download limit', 'woocommerce' ); ?></option>
						<option value="variable_download_expiry"><?php esc_html_e( 'Download expiry', 'woocommerce' ); ?></option>
					</optgroup>
					<?php /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ ?>
					<?php do_action( 'woocommerce_variable_product_bulk_edit_actions' ); ?>
					<?php /* phpcs:enable */ ?>
				</select>

				<div class="variations-pagenav">
					<?php /* translators: variations count */ ?>
					<span class="displaying-num"><?php echo esc_html( sprintf( _n( '%s item', '%s items', $variations_count, 'woocommerce' ), $variations_count ) ); ?></span>
					<span class="expand-close">
						(<a href="#" class="expand_all"><?php esc_html_e( 'Expand', 'woocommerce' ); ?></a> / <a href="#" class="close_all"><?php esc_html_e( 'Close', 'woocommerce' ); ?></a>)
					</span>
					<span class="pagination-links">
						<a class="first-page disabled" title="<?php esc_attr_e( 'Go to the first page', 'woocommerce' ); ?>" href="#">&laquo;</a>
						<a class="prev-page disabled" title="<?php esc_attr_e( 'Go to the previous page', 'woocommerce' ); ?>" href="#">&lsaquo;</a>
						<span class="paging-select">
							<label for="current-page-selector-1" class="screen-reader-text"><?php esc_html_e( 'Select Page', 'woocommerce' ); ?></label>
							<select class="page-selector" id="current-page-selector-1" title="<?php esc_attr_e( 'Current page', 'woocommerce' ); ?>">
								<?php for ( $i = 1; $i <= $variations_total_pages; $i++ ) : ?>
									<?php /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ ?>
									<option value="<?php echo $i; // WPCS: XSS ok. ?>"><?php echo $i; // WPCS: XSS ok. ?></option>
									<?php /* phpcs:enable */ ?>
								<?php endfor; ?>
							</select>
							<?php echo esc_html_x( 'of', 'number of pages', 'woocommerce' ); ?> <span class="total-pages"><?php echo esc_html( $variations_total_pages ); ?></span>
						</span>
						<a class="next-page" title="<?php esc_attr_e( 'Go to the next page', 'woocommerce' ); ?>" href="#">&rsaquo;</a>
						<a class="last-page" title="<?php esc_attr_e( 'Go to the last page', 'woocommerce' ); ?>" href="#">&raquo;</a>
					</span>
				</div>
				<div class="clear"></div>
			</div>

			<div class="add-variation-container">
				<div class="arrow-image-wrapper">
					<img src="<?php echo esc_url( $arrow_img_url ); ?>" />
				</div>
				<img src="<?php echo esc_url( $background_img_url ); ?>" />
				<p>
					<?php
					esc_html_e(
						'No variations yet. Generate them from all added attributes or add a new variation manually.',
						'woocommerce'
					);
					?>
				</p>
			</div>

			<?php /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ ?>
			<div class="woocommerce_variations wc-metaboxes" data-attributes="<?php echo wc_esc_json( wp_json_encode( wc_list_pluck( $variation_attributes, 'get_data' ) ) ); // WPCS: XSS ok. ?>" data-total="<?php echo esc_attr( $variations_count ); ?>" data-total_pages="<?php echo esc_attr( $variations_total_pages ); ?>" data-page="1" data-edited="false"></div>
			<?php /* phpcs:enable */ ?>

			<div class="toolbar">
				<button type="button" class="button-primary save-variation-changes" disabled="disabled"><?php esc_html_e( 'Save changes', 'woocommerce' ); ?></button>
				<button type="button" class="button cancel-variation-changes" disabled="disabled"><?php esc_html_e( 'Cancel', 'woocommerce' ); ?></button>

				<div class="variations-pagenav">
					<?php /* translators: variations count*/ ?>
					<span class="displaying-num"><?php echo esc_html( sprintf( _n( '%s item', '%s items', $variations_count, 'woocommerce' ), $variations_count ) ); ?></span>
					<span class="expand-close">
						(<a href="#" class="expand_all"><?php esc_html_e( 'Expand', 'woocommerce' ); ?></a> / <a href="#" class="close_all"><?php esc_html_e( 'Close', 'woocommerce' ); ?></a>)
					</span>
					<span class="pagination-links">
						<a class="first-page disabled" title="<?php esc_attr_e( 'Go to the first page', 'woocommerce' ); ?>" href="#">&laquo;</a>
						<a class="prev-page disabled" title="<?php esc_attr_e( 'Go to the previous page', 'woocommerce' ); ?>" href="#">&lsaquo;</a>
						<span class="paging-select">
							<label for="current-page-selector-1" class="screen-reader-text"><?php esc_html_e( 'Select Page', 'woocommerce' ); ?></label>
							<select class="page-selector" id="current-page-selector-1" title="<?php esc_attr_e( 'Current page', 'woocommerce' ); ?>">
								<?php for ( $i = 1; $i <= $variations_total_pages; $i++ ) : ?>
									<?php /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ ?>
									<option value="<?php echo $i; // WPCS: XSS ok. ?>"><?php echo $i; // WPCS: XSS ok. ?></option>
									<?php /* phpcs:enable */ ?>
								<?php endfor; ?>
							</select>
							<?php echo esc_html_x( 'of', 'number of pages', 'woocommerce' ); ?> <span class="total-pages"><?php echo esc_html( $variations_total_pages ); ?></span>
						</span>
						<a class="next-page" title="<?php esc_attr_e( 'Go to the next page', 'woocommerce' ); ?>" href="#">&rsaquo;</a>
						<a class="last-page" title="<?php esc_attr_e( 'Go to the last page', 'woocommerce' ); ?>" href="#">&raquo;</a>
					</span>
				</div>
				<div class="clear"></div>
			</div>

		<?php endif; ?>
	</div>
</div>
<script type="text/template" id="tmpl-wc-modal-set-price-variations">
	<div class="wc-backbone-modal">
		<div class="wc-backbone-modal-content">
			<div class="components-modal__content woocommerce-set-price-variations" role="document">
				<div class="components-modal__header">
					<h2><?php echo esc_attr( $modal_title ); ?></h2>
				</div>
				<div class="woocommerce-usage-modal__wrapper">
					<div class="woocommerce-usage-modal__message">
						<span><?php esc_html_e( 'Add price to all variations that don\'t have a price', 'woocommerce' ); ?> (<?php echo esc_attr( get_woocommerce_currency_symbol() ); ?> <?php echo esc_textarea( get_woocommerce_currency() ); ?>)</span>
						<input type="text" class="components-text-control__input wc_input_variations_price"/>
					</div>
					<div class="woocommerce-usage-modal__actions">
						<button class="modal-close components-button is-secondary"><?php esc_html_e( 'Cancel', 'woocommerce' ); ?></button>
						<button class="modal-close button components-button add_variations_price_button button-primary" disabled><?php esc_html_e( 'Add prices', 'woocommerce' ); ?></button>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="wc-backbone-modal-backdrop modal-close"></div>
</script>
html-product-download.php000064400000002603151557063630011520 0ustar00<?php
/**
 * Template used to form individual rows within the downloadable files table.
 *
 * @package WooCommerce\Admin\Views
 *
 * @var bool   $disabled_download Indicates if the current downloadable file is disabled.
 * @var array  $file              Product download data.
 * @var string $key               Product download key.
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<tr>
	<td class="sort"></td>
	<td class="file_name">
		<input type="text" class="input_text" placeholder="<?php esc_attr_e( 'File name', 'woocommerce' ); ?>" name="_wc_file_names[]" value="<?php echo esc_attr( $file['name'] ); ?>" />
		<input type="hidden" name="_wc_file_hashes[]" value="<?php echo esc_attr( $key ); ?>" />
	</td>
	<td class="file_url">
		<input type="text" class="input_text" placeholder="<?php esc_attr_e( 'http://', 'woocommerce' ); ?>" name="_wc_file_urls[]" value="<?php echo esc_attr( $file['file'] ); ?>" />
		<?php if ( $disabled_download ) : ?>
			<span class="disabled">*</span>
		<?php endif; ?>
	</td>
	<td class="file_url_choose" width="1%"><a href="#" class="button upload_file_button" data-choose="<?php esc_attr_e( 'Choose file', 'woocommerce' ); ?>" data-update="<?php esc_attr_e( 'Insert file URL', 'woocommerce' ); ?>"><?php echo esc_html__( 'Choose file', 'woocommerce' ); ?></a></td>
	<td width="1%"><a href="#" class="delete"><?php esc_html_e( 'Delete', 'woocommerce' ); ?></a></td>
</tr>
html-product-variation-download.php000064400000003100151557063630013503 0ustar00<?php
/**
 * Template used to form individual rows within the downloadable files table for variables.
 *
 * @package WooCommerce\Admin\Views
 *
 * @var bool   $disabled_download Indicates if the current downloadable file is disabled.
 * @var array  $file              Product download data.
 * @var string $key               Product download key.
 * @var int    $variation_id      Variation ID.
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<tr>
	<td class="file_name">
		<input type="text" class="input_text" placeholder="<?php esc_attr_e( 'File name', 'woocommerce' ); ?>" name="_wc_variation_file_names[<?php echo esc_attr( $variation_id ); ?>][]" value="<?php echo esc_attr( $file['name'] ); ?>" />
		<input type="hidden" name="_wc_variation_file_hashes[<?php echo esc_attr( $variation_id ); ?>][]" value="<?php echo esc_attr( $key ); ?>" />
	</td>
	<td class="file_url">
		<input type="text" class="input_text" placeholder="<?php esc_attr_e( 'http://', 'woocommerce' ); ?>" name="_wc_variation_file_urls[<?php echo esc_attr( $variation_id ); ?>][]" value="<?php echo esc_attr( $file['file'] ); ?>" />
		<?php if ( $disabled_download ) : ?>
			<span class="disabled">*</span>
		<?php endif; ?>
	</td>
	<td class="file_url_choose" width="1%"><a href="#" class="button upload_file_button" data-choose="<?php esc_attr_e( 'Choose file', 'woocommerce' ); ?>" data-update="<?php esc_attr_e( 'Insert file URL', 'woocommerce' ); ?>"><?php esc_html_e( 'Choose file', 'woocommerce' ); ?></a></td>
	<td width="1%"><a href="#" class="delete"><?php esc_html_e( 'Delete', 'woocommerce' ); ?></a></td>
</tr>
html-variation-admin.php000064400000060424151557063630011322 0ustar00<?php
/**
 * Outputs a variation for editing.
 *
 * @package WooCommerce\Admin
 * @var int $variation_id
 * @var WP_POST $variation
 * @var WC_Product_Variation $variation_object
 * @var array $variation_data array of variation data @deprecated 4.4.0.
 */

use Automattic\WooCommerce\Utilities\I18nUtil;

defined( 'ABSPATH' ) || exit;

?>
<div class="woocommerce_variation wc-metabox closed">
	<h3>
		<a href="javascript:void(0)" class="edit_variation edit"><?php esc_html_e( 'Edit', 'woocommerce' ); ?></a>
		<a href="#" class="remove_variation delete" rel="<?php echo esc_attr( $variation_id ); ?>"><?php esc_html_e( 'Remove', 'woocommerce' ); ?></a>
		<div class="tips sort" data-tip="<?php esc_attr_e( 'Drag and drop, or click to set admin variation order', 'woocommerce' ); ?>"></div>
		<strong>#<?php echo esc_html( $variation_id ); ?> </strong>
		<?php
		$attribute_values = $variation_object->get_attributes( 'edit' );

		foreach ( $product_object->get_attributes( 'edit' ) as $attribute ) {
			if ( ! $attribute->get_variation() ) {
				continue;
			}
			$selected_value = isset( $attribute_values[ sanitize_title( $attribute->get_name() ) ] ) ? $attribute_values[ sanitize_title( $attribute->get_name() ) ] : '';
			?>
			<select name="attribute_<?php echo esc_attr( sanitize_title( $attribute->get_name() ) . "[{$loop}]" ); ?>">
				<option value="">
					<?php
					/* translators: %s: attribute label */
					printf( esc_html__( 'Any %s&hellip;', 'woocommerce' ), wc_attribute_label( $attribute->get_name() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
					?>
				</option>
				<?php if ( $attribute->is_taxonomy() ) : ?>
					<?php foreach ( $attribute->get_terms() as $option ) : ?>
						<?php /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ ?>
						<option <?php selected( $selected_value, $option->slug ); ?> value="<?php echo esc_attr( $option->slug ); ?>"><?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option->name, $option, $attribute->get_name(), $product_object ) ); ?></option>
						<?php /* phpcs:enable */ ?>
					<?php endforeach; ?>
				<?php else : ?>
					<?php foreach ( $attribute->get_options() as $option ) : ?>
						<?php /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ ?>
						<option <?php selected( $selected_value, $option ); ?> value="<?php echo esc_attr( $option ); ?>"><?php echo esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute->get_name(), $product_object ) ); ?></option>
						<?php /* phpcs:enable */ ?>
					<?php endforeach; ?>
				<?php endif; ?>
			</select>
			<?php
		}
		?>
		<input type="hidden" class="variable_post_id" name="variable_post_id[<?php echo esc_attr( $loop ); ?>]" value="<?php echo esc_attr( $variation_id ); ?>" />
		<input type="hidden" class="variation_menu_order" name="variation_menu_order[<?php echo esc_attr( $loop ); ?>]" value="<?php echo esc_attr( $variation_object->get_menu_order( 'edit' ) ); ?>" />

		<?php
		/**
		 * Variations header action.
		 *
		 * @since 3.6.0
		 *
		 * @param WP_Post $variation Post data.
		 * @param int     $loop      Position in the loop.
		 */
		do_action( 'woocommerce_variation_header', $variation, $loop );
		?>
	</h3>
	<div class="woocommerce_variable_attributes wc-metabox-content" style="display: none;">
		<div class="data">
			<p class="form-row form-row-first upload_image">
				<a href="#" class="upload_image_button tips <?php echo $variation_object->get_image_id( 'edit' ) ? 'remove' : ''; ?>" data-tip="<?php echo $variation_object->get_image_id( 'edit' ) ? esc_attr__( 'Remove this image', 'woocommerce' ) : esc_attr__( 'Upload an image', 'woocommerce' ); ?>" rel="<?php echo esc_attr( $variation_id ); ?>">
					<img src="<?php echo $variation_object->get_image_id( 'edit' ) ? esc_url( wp_get_attachment_thumb_url( $variation_object->get_image_id( 'edit' ) ) ) : esc_url( wc_placeholder_img_src() ); ?>" /><input type="hidden" name="upload_image_id[<?php echo esc_attr( $loop ); ?>]" class="upload_image_id" value="<?php echo esc_attr( $variation_object->get_image_id( 'edit' ) ); ?>" />
				</a>
			</p>
			<?php
			if ( wc_product_sku_enabled() ) {
				woocommerce_wp_text_input(
					array(
						'id'            => "variable_sku{$loop}",
						'name'          => "variable_sku[{$loop}]",
						'value'         => $variation_object->get_sku( 'edit' ),
						'placeholder'   => $variation_object->get_sku(),
						'label'         => '<abbr title="' . esc_attr__( 'Stock Keeping Unit', 'woocommerce' ) . '">' . esc_html__( 'SKU', 'woocommerce' ) . '</abbr>',
						'desc_tip'      => true,
						'description'   => __( 'SKU refers to a Stock-keeping unit, a unique identifier for each distinct product and service that can be purchased.', 'woocommerce' ),
						'wrapper_class' => 'form-row form-row-last',
					)
				);
			}
			?>
			<p class="form-row form-row-full options">
				<label>
					<?php esc_html_e( 'Enabled', 'woocommerce' ); ?>
					<input type="checkbox" class="checkbox" name="variable_enabled[<?php echo esc_attr( $loop ); ?>]" <?php checked( in_array( $variation_object->get_status( 'edit' ), array( 'publish', false ), true ), true ); ?> />
				</label>
				<label class="tips" data-tip="<?php esc_attr_e( 'Enable this option if access is given to a downloadable file upon purchase of a product', 'woocommerce' ); ?>">
					<?php esc_html_e( 'Downloadable', 'woocommerce' ); ?>
					<input type="checkbox" class="checkbox variable_is_downloadable" name="variable_is_downloadable[<?php echo esc_attr( $loop ); ?>]" <?php checked( $variation_object->get_downloadable( 'edit' ), true ); ?> />
				</label>
				<label class="tips" data-tip="<?php esc_attr_e( 'Enable this option if a product is not shipped or there is no shipping cost', 'woocommerce' ); ?>">
					<?php esc_html_e( 'Virtual', 'woocommerce' ); ?>
					<input type="checkbox" class="checkbox variable_is_virtual" name="variable_is_virtual[<?php echo esc_attr( $loop ); ?>]" <?php checked( $variation_object->get_virtual( 'edit' ), true ); ?> />
				</label>

				<?php if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) : ?>
					<label class="tips" data-tip="<?php esc_attr_e( 'Enable this option to enable stock management at variation level', 'woocommerce' ); ?>">
						<?php esc_html_e( 'Manage stock?', 'woocommerce' ); ?>
						<input type="checkbox" class="checkbox variable_manage_stock" name="variable_manage_stock[<?php echo esc_attr( $loop ); ?>]" <?php checked( $variation_object->get_manage_stock(), true ); // Use view context so 'parent' is considered. ?> />
					</label>
				<?php endif; ?>

				<?php /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ ?>
				<?php do_action( 'woocommerce_variation_options', $loop, $variation_data, $variation ); ?>
				<?php /* phpcs:enable */ ?>
			</p>

			<div class="variable_pricing">
				<?php
				$label = sprintf(
					/* translators: %s: currency symbol */
					__( 'Regular price (%s)', 'woocommerce' ),
					get_woocommerce_currency_symbol()
				);

				woocommerce_wp_text_input(
					array(
						'id'            => "variable_regular_price_{$loop}",
						'name'          => "variable_regular_price[{$loop}]",
						'value'         => wc_format_localized_price( $variation_object->get_regular_price( 'edit' ) ),
						'label'         => $label,
						'data_type'     => 'price',
						'wrapper_class' => 'form-row form-row-first',
						'placeholder'   => __( 'Variation price (required)', 'woocommerce' ),
					)
				);

				$label = sprintf(
					/* translators: %s: currency symbol */
					__( 'Sale price (%s)', 'woocommerce' ),
					get_woocommerce_currency_symbol()
				);

				woocommerce_wp_text_input(
					array(
						'id'            => "variable_sale_price{$loop}",
						'name'          => "variable_sale_price[{$loop}]",
						'value'         => wc_format_localized_price( $variation_object->get_sale_price( 'edit' ) ),
						'data_type'     => 'price',
						'label'         => $label . ' <a href="#" class="sale_schedule">' . esc_html__( 'Schedule', 'woocommerce' ) . '</a><a href="#" class="cancel_sale_schedule hidden">' . esc_html__( 'Cancel schedule', 'woocommerce' ) . '</a>',
						'wrapper_class' => 'form-row form-row-last',
					)
				);

				$sale_price_dates_from_timestamp = $variation_object->get_date_on_sale_from( 'edit' ) ? $variation_object->get_date_on_sale_from( 'edit' )->getOffsetTimestamp() : false;
				$sale_price_dates_to_timestamp   = $variation_object->get_date_on_sale_to( 'edit' ) ? $variation_object->get_date_on_sale_to( 'edit' )->getOffsetTimestamp() : false;

				$sale_price_dates_from = $sale_price_dates_from_timestamp ? date_i18n( 'Y-m-d', $sale_price_dates_from_timestamp ) : '';
				$sale_price_dates_to   = $sale_price_dates_to_timestamp ? date_i18n( 'Y-m-d', $sale_price_dates_to_timestamp ) : '';

				/* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */
				echo '<div class="form-field sale_price_dates_fields hidden">
					<p class="form-row form-row-first">
						<label>' . esc_html__( 'Sale start date', 'woocommerce' ) . '</label>
						<input type="text" class="sale_price_dates_from" name="variable_sale_price_dates_from[' . esc_attr( $loop ) . ']" value="' . esc_attr( $sale_price_dates_from ) . '" placeholder="' . esc_attr_x( 'From&hellip;', 'placeholder', 'woocommerce' ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ) . '" />
					</p>
					<p class="form-row form-row-last">
						<label>' . esc_html__( 'Sale end date', 'woocommerce' ) . '</label>
						<input type="text" class="sale_price_dates_to" name="variable_sale_price_dates_to[' . esc_attr( $loop ) . ']" value="' . esc_attr( $sale_price_dates_to ) . '" placeholder="' . esc_attr_x( 'To&hellip;', 'placeholder', 'woocommerce' ) . '  YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ) ) . '" />
					</p>
				</div>';
				/* phpcs: enable */

				/**
				 * Variation options pricing action.
				 *
				 * @since 2.5.0
				 *
				 * @param int     $loop           Position in the loop.
				 * @param array   $variation_data Variation data.
				 * @param WP_Post $variation      Post data.
				 */
				do_action( 'woocommerce_variation_options_pricing', $loop, $variation_data, $variation );
				?>
			</div>

			<?php if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) : ?>
				<div class="show_if_variation_manage_stock" style="display: none;">
					<?php
					woocommerce_wp_text_input(
						array(
							'id'                => "variable_stock{$loop}",
							'name'              => "variable_stock[{$loop}]",
							'value'             => wc_stock_amount( $variation_object->get_stock_quantity( 'edit' ) ),
							'label'             => __( 'Stock quantity', 'woocommerce' ),
							'desc_tip'          => true,
							'description'       => __( "Enter a number to set stock quantity at the variation level. Use a variation's 'Manage stock?' check box above to enable/disable stock management at the variation level.", 'woocommerce' ),
							'type'              => 'number',
							'custom_attributes' => array(
								'step' => 'any',
							),
							'data_type'         => 'stock',
							'wrapper_class'     => 'form-row form-row-first',
						)
					);

					echo '<input type="hidden" name="variable_original_stock[' . esc_attr( $loop ) . ']" value="' . esc_attr( wc_stock_amount( $variation_object->get_stock_quantity( 'edit' ) ) ) . '" />';

					woocommerce_wp_select(
						array(
							'id'            => "variable_backorders{$loop}",
							'name'          => "variable_backorders[{$loop}]",
							'value'         => $variation_object->get_backorders( 'edit' ),
							'label'         => __( 'Allow backorders?', 'woocommerce' ),
							'options'       => wc_get_product_backorder_options(),
							'desc_tip'      => true,
							'description'   => __( 'If managing stock, this controls whether or not backorders are allowed. If enabled, stock quantity can go below 0.', 'woocommerce' ),
							'wrapper_class' => 'form-row form-row-last',
						)
					);

					$low_stock_placeholder = ( $product_object->get_manage_stock() && '' !== $product_object->get_low_stock_amount() )
						? sprintf(
							/* translators: %d: Amount of stock left */
							esc_attr__( 'Parent product\'s threshold (%d)', 'woocommerce' ),
							esc_attr( $product_object->get_low_stock_amount() )
						)
						: sprintf(
							/* translators: %d: Amount of stock left */
							esc_attr__( 'Store-wide threshold (%d)', 'woocommerce' ),
							esc_attr( get_option( 'woocommerce_notify_low_stock_amount' ) )
						);

					woocommerce_wp_text_input(
						array(
							'id'                => "variable_low_stock_amount{$loop}",
							'name'              => "variable_low_stock_amount[{$loop}]",
							'value'             => $variation_object->get_low_stock_amount( 'edit' ),
							'placeholder'       => $low_stock_placeholder,
							'label'             => __( 'Low stock threshold', 'woocommerce' ),
							'desc_tip'          => true,
							'description'       => __( 'When variation stock reaches this amount you will be notified by email. The default value for all variations can be set in the product Inventory tab. The shop default value can be set in Settings > Products > Inventory.', 'woocommerce' ),
							'type'              => 'number',
							'custom_attributes' => array(
								'step' => 'any',
							),
							'wrapper_class'     => 'form-row',
						)
					);

					/**
					 * Variation options inventory action.
					 *
					 * @since 2.5.0
					 *
					 * @param int     $loop           Position in the loop.
					 * @param array   $variation_data Variation data.
					 * @param WP_Post $variation      Post data.
					 */
					do_action( 'woocommerce_variation_options_inventory', $loop, $variation_data, $variation );
					?>
				</div>
			<?php endif; ?>

			<div>
				<?php
				woocommerce_wp_select(
					array(
						'id'            => "variable_stock_status{$loop}",
						'name'          => "variable_stock_status[{$loop}]",
						'value'         => $variation_object->get_stock_status( 'edit' ),
						'label'         => __( 'Stock status', 'woocommerce' ),
						'options'       => wc_get_product_stock_status_options(),
						'desc_tip'      => true,
						'description'   => __( 'Controls whether or not the product is listed as "in stock" or "out of stock" on the frontend.', 'woocommerce' ),
						'wrapper_class' => 'form-row form-row-full variable_stock_status',
					)
				);

				if ( wc_product_weight_enabled() ) {
					$label = sprintf(
						/* translators: %s: Weight unit */
						__( 'Weight (%s)', 'woocommerce' ),
						I18nUtil::get_weight_unit_label( get_option( 'woocommerce_weight_unit', 'kg' ) )
					);

					woocommerce_wp_text_input(
						array(
							'id'            => "variable_weight{$loop}",
							'name'          => "variable_weight[{$loop}]",
							'value'         => wc_format_localized_decimal( $variation_object->get_weight( 'edit' ) ),
							'placeholder'   => wc_format_localized_decimal( $product_object->get_weight() ),
							'label'         => $label,
							'desc_tip'      => true,
							'description'   => __( 'Weight in decimal form', 'woocommerce' ),
							'type'          => 'text',
							'data_type'     => 'decimal',
							'wrapper_class' => 'form-row form-row-first hide_if_variation_virtual',
						)
					);
				}

				if ( wc_product_dimensions_enabled() ) {
					$parent_length = wc_format_localized_decimal( $product_object->get_length() );
					$parent_width  = wc_format_localized_decimal( $product_object->get_width() );
					$parent_height = wc_format_localized_decimal( $product_object->get_height() );

					?>
					<p class="form-field form-row dimensions_field hide_if_variation_virtual form-row-last">
						<label for="product_length">
							<?php
							printf(
								/* translators: %s dimension unit */
								esc_html__( 'Dimensions (L&times;W&times;H) (%s)', 'woocommerce' ),
								esc_html( I18nUtil::get_dimensions_unit_label( get_option( 'woocommerce_dimension_unit' ) ) )
							);
							?>
						</label>
						<?php echo wc_help_tip( __( 'Length x width x height in decimal form', 'woocommerce' ) ); ?>
						<span class="wrap">
							<input id="product_length" placeholder="<?php echo $parent_length ? esc_attr( $parent_length ) : esc_attr__( 'Length', 'woocommerce' ); ?>" class="input-text wc_input_decimal" size="6" type="text" name="variable_length[<?php echo esc_attr( $loop ); ?>]" value="<?php echo esc_attr( wc_format_localized_decimal( $variation_object->get_length( 'edit' ) ) ); ?>" />
							<input placeholder="<?php echo $parent_width ? esc_attr( $parent_width ) : esc_attr__( 'Width', 'woocommerce' ); ?>" class="input-text wc_input_decimal" size="6" type="text" name="variable_width[<?php echo esc_attr( $loop ); ?>]" value="<?php echo esc_attr( wc_format_localized_decimal( $variation_object->get_width( 'edit' ) ) ); ?>" />
							<input placeholder="<?php echo $parent_height ? esc_attr( $parent_height ) : esc_attr__( 'Height', 'woocommerce' ); ?>" class="input-text wc_input_decimal last" size="6" type="text" name="variable_height[<?php echo esc_attr( $loop ); ?>]" value="<?php echo esc_attr( wc_format_localized_decimal( $variation_object->get_height( 'edit' ) ) ); ?>" />
						</span>
					</p>
					<?php
				}

				/**
				 * Variation options dimensions action.
				 *
				 * @since 2.5.0
				 *
				 * @param int     $loop           Position in the loop.
				 * @param array   $variation_data Variation data.
				 * @param WP_Post $variation      Post data.
				 */
				do_action( 'woocommerce_variation_options_dimensions', $loop, $variation_data, $variation );
				?>
			</div>

			<div>
				<p class="form-row hide_if_variation_virtual form-row-full">
					<label><?php esc_html_e( 'Shipping class', 'woocommerce' ); ?></label>
					<?php
					wp_dropdown_categories(
						array(
							'taxonomy'         => 'product_shipping_class',
							'hide_empty'       => 0,
							'show_option_none' => __( 'Same as parent', 'woocommerce' ),
							'name'             => 'variable_shipping_class[' . $loop . ']',
							'id'               => '',
							'selected'         => $variation_object->get_shipping_class_id( 'edit' ),
						)
					);
					?>
				</p>

				<?php
				if ( wc_tax_enabled() ) {
					woocommerce_wp_select(
						array(
							'id'            => "variable_tax_class{$loop}",
							'name'          => "variable_tax_class[{$loop}]",
							'value'         => $variation_object->get_tax_class( 'edit' ),
							'label'         => __( 'Tax class', 'woocommerce' ),
							'options'       => array( 'parent' => __( 'Same as parent', 'woocommerce' ) ) + wc_get_product_tax_class_options(),
							'desc_tip'      => 'true',
							'description'   => __( 'Choose a tax class for this product. Tax classes are used to apply different tax rates specific to certain types of product.', 'woocommerce' ),
							'wrapper_class' => 'form-row form-row-full',
						)
					);

					/**
					 * Variation options tax action.
					 *
					 * @since 2.5.0
					 *
					 * @param int     $loop           Position in the loop.
					 * @param array   $variation_data Variation data.
					 * @param WP_Post $variation      Post data.
					 */
					do_action( 'woocommerce_variation_options_tax', $loop, $variation_data, $variation );
				}
				?>
			</div>
			<div>
				<?php
				woocommerce_wp_textarea_input(
					array(
						'id'            => "variable_description{$loop}",
						'name'          => "variable_description[{$loop}]",
						'value'         => $variation_object->get_description( 'edit' ),
						'label'         => __( 'Description', 'woocommerce' ),
						'desc_tip'      => true,
						'description'   => __( 'Enter an optional description for this variation.', 'woocommerce' ),
						'wrapper_class' => 'form-row form-row-full',
					)
				);
				?>
			</div>
			<div class="show_if_variation_downloadable" style="display: none;">
				<div class="form-row form-row-full downloadable_files">
					<label><?php esc_html_e( 'Downloadable files', 'woocommerce' ); ?></label>
					<table class="widefat">
						<thead>
							<div>
								<th><?php esc_html_e( 'Name', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the name of the download shown to the customer.', 'woocommerce' ) ); ?></th>
								<th colspan="2"><?php esc_html_e( 'File URL', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'This is the URL or absolute path to the file which customers will get access to. URLs entered here should already be encoded.', 'woocommerce' ) ); ?></th>
								<th>&nbsp;</th>
							</div>
						</thead>
						<tbody>
							<?php
							$downloadable_files       = $variation_object->get_downloads( 'edit' );
							$disabled_downloads_count = 0;

							if ( $downloadable_files ) {
								foreach ( $downloadable_files as $key => $file ) {
									$disabled_download         = isset( $file['enabled'] ) && false === $file['enabled'];
									$disabled_downloads_count += (int) $disabled_download;
									include __DIR__ . '/html-product-variation-download.php';
								}
							}
							?>
						</tbody>
						<tfoot>
							<div>
								<th colspan="1">
									<a href="#" class="button insert" data-row="
									<?php
									$key               = '';
									$file              = array(
										'file' => '',
										'name' => '',
									);
									$disabled_download = false;
									ob_start();
									require __DIR__ . '/html-product-variation-download.php';
									echo esc_attr( ob_get_clean() );
									?>
									"><?php esc_html_e( 'Add file', 'woocommerce' ); ?></a>
								</th>
								<th colspan="3">
									<?php if ( $disabled_downloads_count ) : ?>
										<span class="disabled">*</span>
										<?php
										printf(
											/* translators: 1: opening link tag, 2: closing link tag. */
											esc_html__( 'The indicated downloads have been disabled (invalid location or filetype&mdash;%1$slearn more%2$s).', 'woocommerce' ),
											'<a href="https://woocommerce.com/document/approved-download-directories" target="_blank">',
											'</a>'
										);
										?>
									<?php endif; ?>
								</th>
							</div>
						</tfoot>
					</table>
				</div>
			</div>
			<div class="show_if_variation_downloadable" style="display: none;">
				<?php
				woocommerce_wp_text_input(
					array(
						'id'                => "variable_download_limit{$loop}",
						'name'              => "variable_download_limit[{$loop}]",
						'value'             => $variation_object->get_download_limit( 'edit' ) < 0 ? '' : $variation_object->get_download_limit( 'edit' ),
						'label'             => __( 'Download limit', 'woocommerce' ),
						'placeholder'       => __( 'Unlimited', 'woocommerce' ),
						'description'       => __( 'Leave blank for unlimited re-downloads.', 'woocommerce' ),
						'type'              => 'number',
						'desc_tip'          => true,
						'custom_attributes' => array(
							'step' => '1',
							'min'  => '0',
						),
						'wrapper_class'     => 'form-row form-row-first',
					)
				);

				woocommerce_wp_text_input(
					array(
						'id'                => "variable_download_expiry{$loop}",
						'name'              => "variable_download_expiry[{$loop}]",
						'value'             => $variation_object->get_download_expiry( 'edit' ) < 0 ? '' : $variation_object->get_download_expiry( 'edit' ),
						'label'             => __( 'Download expiry', 'woocommerce' ),
						'placeholder'       => __( 'Never', 'woocommerce' ),
						'description'       => __( 'Enter the number of days before a download link expires, or leave blank.', 'woocommerce' ),
						'type'              => 'number',
						'desc_tip'          => true,
						'custom_attributes' => array(
							'step' => '1',
							'min'  => '0',
						),
						'wrapper_class'     => 'form-row form-row-last',
					)
				);

				/**
				 * Variation options download action.
				 *
				 * @since 2.5.0
				 *
				 * @param int     $loop           Position in the loop.
				 * @param array   $variation_data Variation data.
				 * @param WP_Post $variation      Post data.
				 */
				do_action( 'woocommerce_variation_options_download', $loop, $variation_data, $variation );
				?>
			</div>
			<?php /* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ ?>
			<?php do_action( 'woocommerce_product_after_variable_attributes', $loop, $variation_data, $variation ); ?>
			<?php /* phpcs:enable */ ?>
		</div>
	</div>
</div>