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/LeaveReviewActionTrait.php.tar
httpdocs/wp-content/plugins/google-listings-and-ads/src/Notes/LeaveReviewActionTrait.php000064400000001534151550731160034005 0ustar00var/www/vhosts/uyarreklam.com.tr<?php
declare( strict_types=1 );

namespace Automattic\WooCommerce\GoogleListingsAndAds\Notes;

use Automattic\WooCommerce\Admin\Notes\Note as NoteEntry;

/**
 * Trait LeaveReviewActionTrait
 *
 * @since 1.7.0
 *
 * @package Automattic\WooCommerce\GoogleListingsAndAds\Notes
 */
trait LeaveReviewActionTrait {

	/**
	 * Add the 'leave a review' action to a note.
	 *
	 * Randomly chooses whether to show the WP.org vs WC.com link.
	 *
	 * @param NoteEntry $note
	 */
	protected function add_leave_review_note_action( NoteEntry $note ) {
		$wp_link = 'https://wordpress.org/support/plugin/google-listings-and-ads/reviews/#new-post';
		$wc_link = 'https://woocommerce.com/products/google-listings-and-ads/#reviews';

		$note->add_action(
			'leave-review',
			__( 'Leave a review', 'google-listings-and-ads' ),
			wp_rand( 0, 1 ) ? $wp_link : $wc_link
		);
	}
}