<?php
/**
 * Size Chart Pro  Hook helper.
 *
 * @package Ayyash
 * @author ThemeRox
 */

if ( ! defined( 'ABSPATH' ) ) {
	header( 'Status: 403 Forbidden' );
	header( 'HTTP/1.1 403 Forbidden' );
	die();
}

if ( ! function_exists( 'ayyash_size_chart_button' ) ) {
	/**
	 * Size Chart Button
	 *
	 * @return void
	 */
	function ayyash_size_chart_button() {

		if ( is_admin() ) {
			return;
		}

		remove_action( 'woocommerce_single_product_summary', [ Size_Chart_Pro_Frontend(), 'render_popup_button' ], 35 );
		add_action( 'ayyash_product_actions', [ Size_Chart_Pro_Frontend(), 'render_popup_button' ], 10 );
	}
}
