*/ public function object_types(): array; /** * Why the plan items are invalid ('' = valid). Called with ALL items of a plan that has at least one line of * this handler's types. * * @param array> $items Items. */ public function invalid_items( array $items ): string; /** * Extra permission check before approve / undo (null = allowed). * * @param array $changeset Changeset. * @param int $user_id User. */ public function denied( array $changeset, int $user_id ): ?WP_Error; /** * Whether these lines need WooCommerce (then they are neither applied nor undone while it is inactive). */ public function needs_woocommerce(): bool; /** * Applies this handler's pending lines of a changeset (moves each line to applied / conflict / failed). * * @param int $changeset_id Changeset. * @param ChangesetRepository $repo Repository. */ public function apply( int $changeset_id, ChangesetRepository $repo ): void; /** * Undoes this handler's applied lines of a changeset (moves each line to reverted / revert_conflict). * * @param int $changeset_id Changeset. * @param ChangesetRepository $repo Repository. */ public function revert( int $changeset_id, ChangesetRepository $repo ): void; }