PluginProbe
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent / 3.5.4
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent v3.5.4
3.5.4 3.5.3 3.5.2 3.5.1 3.4.9 3.5.0 3.4.8 3.4.7 trunk 2.3.1 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6
← All changes | includes/class-wpsc-functions.php +15 -0 3.5.2 → 3.5.4 View file →
@@ -72,8 +72,23 @@
72 72 $object = WPSC_Customer::get_anonymous_customer();
73 73 }
74 74 break;
75 75
76 + case 'wpsc_ticket':
77 + if ( $value && isset( self::$ref_classes[ $ref_class ] ) ) {
78 + $class = self::$ref_classes[ $ref_class ]['class'];
79 + $object = new $class( $value );
80 + // A ticket referenced from another record (a todo, a thread, a timer log, ...)
81 + // may have since been archived - archived tickets are moved out of the live
82 + // tickets table entirely, so the lookup above resolves to an empty object. Fall
83 + // back to the archived-ticket table rather than silently returning a blank
84 + // ticket (blank id, blank subject, blank link) to every caller.
85 + if ( ! $object->id ) {
86 + $object = new WPSC_Archive_Ticket( $value );
87 + }
88 + }
89 + break;
90 +
76 91 default:
77 92 $object = apply_filters( 'wpsc_fun_get_object', $value, $ref_class );
78 93 if ( ! is_object( $object ) && isset( self::$ref_classes[ $ref_class ] ) ) {
79 94 $class = self::$ref_classes[ $ref_class ]['class'];