Use correct class name.

This commit is contained in:
Vedanshu Jain 2023-02-03 14:17:54 +05:30
parent c678ce7248
commit b5ae765b93
1 changed files with 2 additions and 2 deletions

View File

@ -35,8 +35,8 @@ class OrderCache extends ObjectCache {
* @return string[]|null An array of error messages, or null if the object is valid.
*/
protected function validate( $object ): ?array {
if ( ! $object instanceof \WC_Abstract_Legacy_Order ) {
return array( 'The supplied order is not an instance of WC_Order, ' . gettype( $object ) );
if ( ! $object instanceof \WC_Abstract_Order ) {
return array( 'The supplied order is not an instance of WC_Abstract_Order, ' . gettype( $object ) );
}
return null;