get_items(); ob_start(); $path = YAYMAIL_PLUGIN_PATH . 'views/templates/emails/LatePoint/latepoint-booking-detail.php'; include $path; $html = ob_get_contents(); ob_end_clean(); return $html; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointCalendarStartDate( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_calendar_start_date = ''; return $list_calendar_start_date; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $list_calendar_start_date = ''; return $list_calendar_start_date; } else { // Handle error: $order object doesn't have get_items() method return null; } } } //WooCommerce for LatePoint public static function wooLatepointSelectedTotalAttendees( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'selected_total_attendies' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointCaption( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'caption' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointBgColor( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'bg_color' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointTextColor( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'text_color' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointFontSize( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'font_size' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointBorder( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'border' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointBorderRadius( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'border_radius' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointMargin( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'margin' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointPaddings( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'padding' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointCss( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'css' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointShowLocations( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'show_locations' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointShowAgents( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'show_agents' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointShowServices( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'show_services' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointShowServiceCategories( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'show_service_categories' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointSelectedLocation( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'selected_location' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointSelectedAgent( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'selected_agent' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointSelectedService( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'selected_service' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointSelectedServiceCategory( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'selected_service_category' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointSelectedDuration( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'selected_duration' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointHideSidePanel( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'hide_side_panel' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } public static function wooLatepointHideSummary( $args, $order, $sent_to_admin ) { if ( null === $order ) { $list_attributes = ''; return $list_attributes; } else { if ( method_exists( $order, 'get_items' ) ) { $order_items = $order->get_items(); $valueRestrictionsAttributes = self::getRestrictionsAttributes( $order_items, 'hide_summary' ); return $valueRestrictionsAttributes; } else { // Handle error: $order object doesn't have get_items() method return null; } } } /** * It takes the order items and the value of the attribute you want to display, and returns a list of * the attributes * * @param order_items This is the array of order items. * @param value The name of the attribute you want to display. * * @return A list of attributes. */ public static function getRestrictionsAttributes( $order_items, $value ) { $list_attributes = ''; return $list_attributes; } }