File "SessionVariables.php"

Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/flexible-shipping-pro/src/WPDesk/FSPro/Blocks/FreeShipping/SessionVariables.php
File size: 598 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace WPDesk\FSPro\Blocks\FreeShipping;

use FSProVendor\WPDesk\PluginBuilder\Plugin\Hookable;
use WPDesk\FSPro\TableRate\FreeShipping\FreeShippingQuantityNoticeGenerator;

class SessionVariables implements Hookable {

	public function hooks() {
		add_filter( 'flexible-shipping/free-shipping-block/session-variables', function( $session_variables ) {
			if ( ! is_array( $session_variables ) ) {
				$session_variables = [ $session_variables ];
			}
			$session_variables[] = FreeShippingQuantityNoticeGenerator::FS_FREE_SHIPPING_NOTICE_NAME;
			return $session_variables;
		} );
	}

}